summaryrefslogtreecommitdiff
path: root/src/thread
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2011-09-27 23:08:59 -0400
committerRich Felker <dalias@aerifal.cx>2011-09-27 23:08:59 -0400
commit067bdc2c180885af831f55f971f5eb17d2c9dc27 (patch)
tree09afaa24b93d104e89f67afdffe12bf8b268f7b0 /src/thread
parent3ac092bd7d700c6316c64660e2a722a2f85652a5 (diff)
downloadmusl-067bdc2c180885af831f55f971f5eb17d2c9dc27.tar.gz
correctly handle the degenerate barrier in the pshared case
Diffstat (limited to 'src/thread')
-rw-r--r--src/thread/pthread_barrier_wait.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/thread/pthread_barrier_wait.c b/src/thread/pthread_barrier_wait.c
index 83c32ca3..a97f6d56 100644
--- a/src/thread/pthread_barrier_wait.c
+++ b/src/thread/pthread_barrier_wait.c
@@ -24,7 +24,7 @@ static int pshared_barrier_wait(pthread_barrier_t *b)
int seq;
int ret = 0;
- if (!limit) return PTHREAD_BARRIER_SERIAL_THREAD;
+ if (limit==1) return PTHREAD_BARRIER_SERIAL_THREAD;
while (a_swap(&b->_b_lock, 1))
__wait(&b->_b_lock, &b->_b_waiters, 1, 0);