From 7f0e5da596d0a28e502cf933ce73898771dff724 Mon Sep 17 00:00:00 2001 From: Alastair Poole Date: Sat, 26 Dec 2020 12:14:41 +0000 Subject: [PATCH] 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