projects
/
musl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
056f9d8
)
reject invalid arguments to pthread_barrierattr_setpshared
author
Rich Felker
<dalias@aerifal.cx>
Tue, 28 Aug 2018 22:12:17 +0000
(18:12 -0400)
committer
Rich Felker
<dalias@aerifal.cx>
Tue, 28 Aug 2018 22:12:17 +0000
(18:12 -0400)
this is a POSIX requirement.
src/thread/pthread_barrierattr_setpshared.c
patch
|
blob
|
history
diff --git
a/src/thread/pthread_barrierattr_setpshared.c
b/src/thread/pthread_barrierattr_setpshared.c
index
b391461
..
c2d2929
100644
(file)
--- a/
src/thread/pthread_barrierattr_setpshared.c
+++ b/
src/thread/pthread_barrierattr_setpshared.c
@@
-2,6
+2,7
@@
int pthread_barrierattr_setpshared(pthread_barrierattr_t *a, int pshared)
{
+ if (pshared > 1U) return EINVAL;
a->__attr = pshared ? INT_MIN : 0;
return 0;
}