Revert "eina threadqueue - for paranoia lock+ulock+free in order locks taken"
authorStefan Schmidt <stefan@osg.samsung.com>
Thu, 11 Aug 2016 12:26:16 +0000 (14:26 +0200)
committerStefan Schmidt <stefan@osg.samsung.com>
Thu, 11 Aug 2016 13:25:32 +0000 (15:25 +0200)
This reverts commit d19cd4e63caf461e28fb536968f82e0d8a365cdc.

This causes a SIGBUS error on OpenBSD when closing any application. As this
was safety patch only I will revert it for the 1.18 release and we can work
out what breaks OpenBSD here for 1.19

Fixes T4332

src/lib/eina/eina_thread_queue.c

index c76a5cb..d5bee95 100644 (file)
@@ -137,14 +137,14 @@ _eina_thread_queue_msg_block_new(int size)
 static void
 _eina_thread_queue_msg_block_real_free(Eina_Thread_Queue_Msg_Block *blk)
 {
+   eina_lock_take(&(blk->lock_non_0_ref));
+   eina_lock_release(&(blk->lock_non_0_ref));
+   eina_lock_free(&(blk->lock_non_0_ref));
 #ifndef ATOMIC
    eina_lock_take(&(blk->lock_ref));
    eina_lock_release(&(blk->lock_ref));
    eina_spinlock_free(&(blk->lock_ref));
 #endif
-   eina_lock_take(&(blk->lock_non_0_ref));
-   eina_lock_release(&(blk->lock_non_0_ref));
-   eina_lock_free(&(blk->lock_non_0_ref));
    free(blk);
 }