From 1b586b1fd5c7a7ed994e210a5a3f07f62760ee83 Mon Sep 17 00:00:00 2001 From: davidxu Date: Mon, 4 Apr 2005 23:43:53 +0000 Subject: Pass exact number of threads. --- lib/libthr/thread/thr_barrier.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/libthr') diff --git a/lib/libthr/thread/thr_barrier.c b/lib/libthr/thread/thr_barrier.c index afb6a40..113fce0 100644 --- a/lib/libthr/thread/thr_barrier.c +++ b/lib/libthr/thread/thr_barrier.c @@ -91,7 +91,7 @@ _pthread_barrier_wait(pthread_barrier_t *barrier) /* Current thread is lastest thread */ bar->b_waiters = 0; bar->b_cycle++; - _thr_umtx_wake(&bar->b_cycle, bar->b_count); + _thr_umtx_wake(&bar->b_cycle, bar->b_count - 1); THR_UMTX_UNLOCK(curthread, &bar->b_lock); ret = PTHREAD_BARRIER_SERIAL_THREAD; } else { -- cgit v1.1