提交 baf95a5a 编写于 作者: R Rich Felker

reject invalid arguments to pthread_barrierattr_setpshared

this is a POSIX requirement.
上级 056f9d81
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
int pthread_barrierattr_setpshared(pthread_barrierattr_t *a, int pshared) int pthread_barrierattr_setpshared(pthread_barrierattr_t *a, int pshared)
{ {
if (pshared > 1U) return EINVAL;
a->__attr = pshared ? INT_MIN : 0; a->__attr = pshared ? INT_MIN : 0;
return 0; return 0;
} }
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册