提交 6dd6929b 编写于 作者: L liuxianliang 提交者: guo

[fix] return "EINVAL" if "count" is zero.

上级 75a55f20
......@@ -72,6 +72,8 @@ int pthread_barrier_init(pthread_barrier_t *barrier,
return EINVAL;
if (attr && (*attr != PTHREAD_PROCESS_PRIVATE))
return EINVAL;
if (count == 0)
return EINVAL;
barrier->count = count;
pthread_cond_init(&(barrier->cond), NULL);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册