aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2003-03-19 09:42:14 +0000
committerUlrich Drepper <drepper@redhat.com>2003-03-19 09:42:14 +0000
commitbbb9ba4324f36a7c4d933d6ebda033519cd43a53 (patch)
tree9ac75d5c55698afd778f3731d28ca483cbe930a8
parentca341eb2bd82a17dc9042e9669a7db181d6ceb29 (diff)
downloadglibc-bbb9ba4324f36a7c4d933d6ebda033519cd43a53.tar
glibc-bbb9ba4324f36a7c4d933d6ebda033519cd43a53.tar.gz
glibc-bbb9ba4324f36a7c4d933d6ebda033519cd43a53.tar.bz2
glibc-bbb9ba4324f36a7c4d933d6ebda033519cd43a53.zip
(__pthread_cond_broadcast): Release lock before waking waiters.
-rw-r--r--nptl/sysdeps/pthread/pthread_cond_broadcast.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/nptl/sysdeps/pthread/pthread_cond_broadcast.c b/nptl/sysdeps/pthread/pthread_cond_broadcast.c
index 7ae1602fc1..1076fe3c50 100644
--- a/nptl/sysdeps/pthread/pthread_cond_broadcast.c
+++ b/nptl/sysdeps/pthread/pthread_cond_broadcast.c
@@ -40,6 +40,9 @@ __pthread_cond_broadcast (cond)
/* Yes. Mark them all as woken. */
cond->__data.__wakeup_seq = cond->__data.__total_seq;
+ /* We are done. */
+ lll_mutex_unlock (cond->__data.__lock);
+
/* The futex syscall operates on a 32-bit word. That is fine,
we just use the low 32 bits of the sequence counter. */
#if BYTE_ORDER == LITTLE_ENDIAN
@@ -52,6 +55,9 @@ __pthread_cond_broadcast (cond)
/* Wake everybody. */
lll_futex_wake (futex, INT_MAX);
+
+ /* That's all. */
+ return 0;
}
/* We are done. */