diff options
Diffstat (limited to 'sysdeps/generic/pt-cond-signal.c')
-rw-r--r-- | sysdeps/generic/pt-cond-signal.c | 23 |
1 files changed, 5 insertions, 18 deletions
diff --git a/sysdeps/generic/pt-cond-signal.c b/sysdeps/generic/pt-cond-signal.c index d7c91e6..4b5450c 100644 --- a/sysdeps/generic/pt-cond-signal.c +++ b/sysdeps/generic/pt-cond-signal.c @@ -21,8 +21,10 @@ #include <pt-internal.h> -static int -cond_signal (struct __pthread_cond *cond, int *unblocked) +/* Unblock at least one of the threads that are blocked on condition + variable COND. */ +int +__pthread_cond_signal (pthread_cond_t *cond) { struct __pthread *wakeup; @@ -33,24 +35,9 @@ cond_signal (struct __pthread_cond *cond, int *unblocked) __pthread_spin_unlock (&cond->__lock); if (wakeup) - { - /* We found a thread waiting for the condition to be signalled. - Wake it up! */ - __pthread_wakeup (wakeup); - *unblocked = 1; - } + __pthread_wakeup (wakeup); return 0; } -/* Unblock at least one of the threads that are blocked on condition - variable COND. */ -int -__pthread_cond_signal (pthread_cond_t *cond) -{ - int unblocked = 0; - - return cond_signal (cond, &unblocked); -} - strong_alias (__pthread_cond_signal, pthread_cond_signal); |