summaryrefslogtreecommitdiff
path: root/legacy/eina/src/tests/eina_bench_hash.c
diff options
context:
space:
mode:
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>2010-08-10 03:26:15 +0000
committerMike Blumenkrantz <michael.blumenkrantz@gmail.com>2010-08-10 03:26:15 +0000
commit56a0bd9396261d12eb2926197f1f11c4b6cafdb3 (patch)
tree9f11f8ea75cda951c1134dc72dd605709e544bde /legacy/eina/src/tests/eina_bench_hash.c
parentccfd7f27fc0107bae66514aca5719c64747cb8dd (diff)
implement threadsafety for arrays, alter all eina internal array usage to (hopefully) be threadsafe
call eina_threads_init() to enable this if you have pthread rwlock support (posix 2001) note some function prototypes have lost const on array params to allow locking WARNING: you should NOT call eina_threads_shutdown unless you are positive that you will not use any arrays which were created while threadsafe mode were enabled, and vice versa. Failing to adhere to this warning WILL result in either deadlocks or memory leaks. SVN revision: 50951
Diffstat (limited to '')
-rw-r--r--legacy/eina/src/tests/eina_bench_hash.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/legacy/eina/src/tests/eina_bench_hash.c b/legacy/eina/src/tests/eina_bench_hash.c
index 93bb69e993..a615a1504d 100644
--- a/legacy/eina/src/tests/eina_bench_hash.c
+++ b/legacy/eina/src/tests/eina_bench_hash.c
@@ -344,8 +344,9 @@ eina_bench_lookup_evas(int request)
344 344
345 evas_hash_free(hash); 345 evas_hash_free(hash);
346 346
347 EINA_ARRAY_ITER_NEXT(array, i, tmp_val, it) 347 EINA_ARRAY_THREADSAFE_ITER_NEXT(array, i, tmp_val, it,
348 free(tmp_val); 348 free(tmp_val);
349 );
349 350
350 eina_array_free(array); 351 eina_array_free(array);
351} 352}