]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
(__pthread_cond_broadcast): Release lock before waking waiters.
authorUlrich Drepper <drepper@redhat.com>
Wed, 19 Mar 2003 09:42:14 +0000 (09:42 +0000)
committerUlrich Drepper <drepper@redhat.com>
Wed, 19 Mar 2003 09:42:14 +0000 (09:42 +0000)
nptl/sysdeps/pthread/pthread_cond_broadcast.c

index 7ae1602fc1ed6fac77c9fb6e94c549dc2a06b6bf..1076fe3c50912fa841f85f13a6811bf733e9342f 100644 (file)
@@ -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.  */