netstar pushed a commit to branch master.

http://git.enlightenment.org/apps/evisum.git/commit/?id=7f0e5da596d0a28e502cf933ce73898771dff724

commit 7f0e5da596d0a28e502cf933ce73898771dff724
Author: Alastair Poole <nets...@gmail.com>
Date:   Sat Dec 26 12:14:41 2020 +0000

    openbsd: locking same thread please.
    
    This *might* be the problem??? Seen on arm...
---
 src/bin/ui/ui_sensors.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/bin/ui/ui_sensors.c b/src/bin/ui/ui_sensors.c
index 246a67e..edd36aa 100644
--- a/src/bin/ui/ui_sensors.c
+++ b/src/bin/ui/ui_sensors.c
@@ -96,7 +96,10 @@ _sensors_update(void *data, Ecore_Thread *thread)
         system_power_state_get(&msg->power);
 
         if (eina_lock_take_try(&_lock))
-          ecore_thread_feedback(thread, msg);
+          {
+             ecore_thread_feedback(thread, msg);
+             eina_lock_release(&_lock);
+          }
 
         if (ecore_thread_check(thread)) break;
 
@@ -135,7 +138,6 @@ _sensors_update_feedback_cb(void *data, Ecore_Thread 
*thread, void *msgdata)
           elm_icon_standard_set(pd->power_ic, evisum_icon_path_get("off"));
         evas_object_show(pd->power_ic);
      }
-
    l = eina_list_nth_list(pd->batteries, 0);
    while (l && msg->power.battery_count)
      {
@@ -152,8 +154,6 @@ _sensors_update_feedback_cb(void *data, Ecore_Thread 
*thread, void *msgdata)
      }
 
    system_power_state_free(&msg->power);
-
-   eina_lock_release(&_lock);
 }
 
 static void

-- 


Reply via email to