From a8a343d2e609ed41b59e73f668830a79108107ff Mon Sep 17 00:00:00 2001 From: David Xu Date: Tue, 5 Dec 2006 23:46:11 +0000 Subject: [PATCH] _thr_ucond_wait drops lock, we should pick it up again. --- lib/libthr/thread/thr_barrier.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/libthr/thread/thr_barrier.c b/lib/libthr/thread/thr_barrier.c index cafba69dbc25..bbd444708dee 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);