projects
/
oweals
/
musl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3ac092b
)
correctly handle the degenerate barrier in the pshared case
author
Rich Felker
<dalias@aerifal.cx>
Wed, 28 Sep 2011 03:08:59 +0000
(23:08 -0400)
committer
Rich Felker
<dalias@aerifal.cx>
Wed, 28 Sep 2011 03:08:59 +0000
(23:08 -0400)
src/thread/pthread_barrier_wait.c
patch
|
blob
|
history
diff --git
a/src/thread/pthread_barrier_wait.c
b/src/thread/pthread_barrier_wait.c
index 83c32ca35f0e7092be9fd26f8094c557ecac58b3..a97f6d56a0f3ba1eae0042cce194644557b8b763 100644
(file)
--- 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);