_thr_ucond_wait drops lock, we should pick it up again.

This commit is contained in:
David Xu 2006-12-05 23:46:11 +00:00
parent 3f61998e1c
commit a8a343d2e6
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=164927

View File

@ -103,6 +103,7 @@ _pthread_barrier_wait(pthread_barrier_t *barrier)
cycle = bar->b_cycle;
do {
_thr_ucond_wait(&bar->b_cv, &bar->b_lock, NULL, 0);
THR_UMUTEX_LOCK(curthread, &bar->b_lock);
/* test cycle to avoid bogus wakeup */
} while (cycle == bar->b_cycle);
THR_UMUTEX_UNLOCK(curthread, &bar->b_lock);