summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2016-08-06 09:51:10 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2016-08-06 09:56:02 +0900
commitd19cd4e63caf461e28fb536968f82e0d8a365cdc (patch)
tree94c7dd4bdc86e8aeb499358c87362dfb01db22b0
parent64bf1da8c17b3fc32dd00fda35c0962f2d65b02b (diff)
eina threadqueue - for paranoia lock+ulock+free in order locks taken
so mimic order of locks taken to be paranoid ... this wouldnt be a deadlock issue but just to be safe instead of sorry.
-rw-r--r--src/lib/eina/eina_thread_queue.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/eina/eina_thread_queue.c b/src/lib/eina/eina_thread_queue.c
index d5bee95c44..c76a5cbfa1 100644
--- a/src/lib/eina/eina_thread_queue.c
+++ b/src/lib/eina/eina_thread_queue.c
@@ -137,14 +137,14 @@ _eina_thread_queue_msg_block_new(int size)
137static void 137static void
138_eina_thread_queue_msg_block_real_free(Eina_Thread_Queue_Msg_Block *blk) 138_eina_thread_queue_msg_block_real_free(Eina_Thread_Queue_Msg_Block *blk)
139{ 139{
140 eina_lock_take(&(blk->lock_non_0_ref));
141 eina_lock_release(&(blk->lock_non_0_ref));
142 eina_lock_free(&(blk->lock_non_0_ref));
143#ifndef ATOMIC 140#ifndef ATOMIC
144 eina_lock_take(&(blk->lock_ref)); 141 eina_lock_take(&(blk->lock_ref));
145 eina_lock_release(&(blk->lock_ref)); 142 eina_lock_release(&(blk->lock_ref));
146 eina_spinlock_free(&(blk->lock_ref)); 143 eina_spinlock_free(&(blk->lock_ref));
147#endif 144#endif
145 eina_lock_take(&(blk->lock_non_0_ref));
146 eina_lock_release(&(blk->lock_non_0_ref));
147 eina_lock_free(&(blk->lock_non_0_ref));
148 free(blk); 148 free(blk);
149} 149}
150 150