提交 067bdc2c 编写于 作者: R Rich Felker

correctly handle the degenerate barrier in the pshared case

上级 3ac092bd
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册