diff options
| author | David Xu <davidxu@FreeBSD.org> | 2006-09-06 04:04:10 +0000 |
|---|---|---|
| committer | David Xu <davidxu@FreeBSD.org> | 2006-09-06 04:04:10 +0000 |
| commit | bddd24cd9c3e6144282ff7eaa92a3ad032e5be7b (patch) | |
| tree | 7044b040d8f18506b5f3294848fd18b67eaf0bd2 /lib/libthr/thread/thr_barrier.c | |
| parent | b2d24734cd9e4cf85ca2015468e1b29f8468bfb7 (diff) | |
Notes
Diffstat (limited to 'lib/libthr/thread/thr_barrier.c')
| -rw-r--r-- | lib/libthr/thread/thr_barrier.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/libthr/thread/thr_barrier.c b/lib/libthr/thread/thr_barrier.c index 8d65d9ffed3c..48fb7ddca7c3 100644 --- a/lib/libthr/thread/thr_barrier.c +++ b/lib/libthr/thread/thr_barrier.c @@ -69,7 +69,7 @@ _pthread_barrier_init(pthread_barrier_t *barrier, if (bar == NULL) return (ENOMEM); - _thr_umtx_init(&bar->b_lock); + _thr_umutex_init(&bar->b_lock); bar->b_cycle = 0; bar->b_waiters = 0; bar->b_count = count; @@ -90,17 +90,17 @@ _pthread_barrier_wait(pthread_barrier_t *barrier) return (EINVAL); bar = *barrier; - THR_UMTX_LOCK(curthread, &bar->b_lock); + THR_UMUTEX_LOCK(curthread, &bar->b_lock); if (++bar->b_waiters == bar->b_count) { /* Current thread is lastest thread */ bar->b_waiters = 0; bar->b_cycle++; _thr_umtx_wake(&bar->b_cycle, bar->b_count - 1); - THR_UMTX_UNLOCK(curthread, &bar->b_lock); + THR_UMUTEX_UNLOCK(curthread, &bar->b_lock); ret = PTHREAD_BARRIER_SERIAL_THREAD; } else { cycle = bar->b_cycle; - THR_UMTX_UNLOCK(curthread, &bar->b_lock); + THR_UMUTEX_UNLOCK(curthread, &bar->b_lock); do { _thr_umtx_wait(&bar->b_cycle, cycle, NULL); /* test cycle to avoid bogus wakeup */ |
