From f93329d11950969228bef067f278041b2644b793 Mon Sep 17 00:00:00 2001 From: "Carsten Haitzler (Rasterman)" Date: Tue, 15 Oct 2013 10:35:10 +0900 Subject: [PATCH] Revert "eina: fix CID 1106340: Logically dead code (DEADCODE) reported by coverity." This reverts commit 1c1b48ca64c4d13cfd3677cde1ee99e4cf6c2c15. this commit is causing all sorts of hell and crashes, hangs and what not. like: Thread 1 (Thread 0x7feb7389e780 (LWP 7149)): No symbol table info available. No symbol table info available. at lib/eina/eina_inlist.c:422 l = 0xf38a50 __FUNCTION__ = "eina_inlist_demote" #3 0x00007feb6a809867 in _eina_chained_mempool_alloc_in ( pool=pool@entry=0x8650a0, p=p@entry=0xf38a50) at modules/eina/mp/chained_pool/eina_chained_mempool.c:197 mem = 0xf3a690 #4 0x00007feb6a809dff in eina_chained_mempool_malloc (data=0x8650a0, size=) at modules/eina/mp/chained_pool/eina_chained_mempool.c:300 pool = 0x8650a0 p = 0xf38a50 mem = #5 0x00007feb6a7e451f in eina_mempool_malloc (size=40, mp=) at lib/eina/eina_inline_mempool.x:103 No locals. #6 _eina_list_mempool_list_new (list=0x7feb5402a510) at lib/eina/eina_list.c:199 No locals. #7 eina_list_append (list=0x7feb5402a510, data=0xf41720) at lib/eina/eina_list.c:534 l = __FUNCTION__ = "eina_list_append" #8 0x0000000000445d1a in e_bindings_signal_add (ctxt=, sig=0x947e6c "mouse,clicked,[12]", src=0x92248c "e.event.close", mod=E_BINDING_MODIFIER_NONE, any_mod=1, action=0x93479c "window_close", params=0x0) at e_bindings.c:1036 binding = 0xf41720 #9 0x00000000004469d4 in e_bindings_init () at e_bindings.c:68 ebs = 0x947df0 ebm = ebw = ebe = ebk = eba = l = 0x9532e0 #10 0x0000000000437516 in main (argc=, argv=) at e_main.c:941 safe_mode = 0 '\000' after_restart = 1 '\001' waslocked = 0 '\000' t = tstart = s = buff = "1381800872.3", '\000' action = {__sigaction_handler = { sa_handler = 0x4fca00 , sa_sigaction = 0x4fca00 }, sa_mask = {__val = { 0 }}, sa_flags = -1073741820, sa_restorer = 0x0} __FUNCTION__ = "main" Detaching from program: /usr/local/bin/enlightenment, process 7149 --- src/lib/eina/eina_inline_lock_posix.x | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/lib/eina/eina_inline_lock_posix.x b/src/lib/eina/eina_inline_lock_posix.x index 3d909296b0..2e5b038ea4 100644 --- a/src/lib/eina/eina_inline_lock_posix.x +++ b/src/lib/eina/eina_inline_lock_posix.x @@ -608,11 +608,10 @@ eina_spinlock_take(Eina_Spinlock *spinlock) { if (errno == EBUSY) sched_yield(); else if (errno == EDEADLK) return EINA_LOCK_DEADLOCK; - else return EINA_LOCK_FAIL; } } while (t != 0); - return EINA_LOCK_SUCCEED; + return t ? EINA_LOCK_FAIL : EINA_LOCK_SUCCEED; #else return eina_lock_take(spinlock); #endif