aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/main_notify.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/src/main_notify.c b/src/main_notify.c
index 1ecc11f3a..1ef514304 100644
--- a/src/main_notify.c
+++ b/src/main_notify.c
@@ -90,22 +90,12 @@ static int wakeup_via_pipe(void)
}
}
-static void wakeup_via_cond(void)
-{
- int ret = pthread_mutex_trylock(&main_wakeup_mutex);
-
- if (ret == EBUSY)
- return; /* nope, no need to wakeup at all */
- pthread_cond_signal(&main_wakeup);
- pthread_mutex_unlock(&main_wakeup_mutex);
-}
-
void wakeup_main_task(void)
{
assert(!pthread_equal(main_task, pthread_self()));
if (!wakeup_via_pipe())
- wakeup_via_cond();
+ pthread_cond_signal(&main_wakeup);
}
void main_notify_lock(void)