diff options
author | davidxu <davidxu@FreeBSD.org> | 2006-12-05 23:46:11 +0000 |
---|---|---|
committer | davidxu <davidxu@FreeBSD.org> | 2006-12-05 23:46:11 +0000 |
commit | b01e86cf0ab748cfc431b4c5a1e909a171cb39bb (patch) | |
tree | e469a73dafa8a807311114aa746f581e980617a8 | |
parent | bb4b2a6105d27b2333e619d4a3cac6a2b69a85b4 (diff) | |
download | FreeBSD-src-b01e86cf0ab748cfc431b4c5a1e909a171cb39bb.zip FreeBSD-src-b01e86cf0ab748cfc431b4c5a1e909a171cb39bb.tar.gz |
_thr_ucond_wait drops lock, we should pick it up again.
-rw-r--r-- | lib/libthr/thread/thr_barrier.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/libthr/thread/thr_barrier.c b/lib/libthr/thread/thr_barrier.c index cafba69..bbd4447 100644 --- a/lib/libthr/thread/thr_barrier.c +++ b/lib/libthr/thread/thr_barrier.c @@ -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); |