diff options
Diffstat (limited to 'nptl/pthread_condattr_setpshared.c')
-rw-r--r-- | nptl/pthread_condattr_setpshared.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/nptl/pthread_condattr_setpshared.c b/nptl/pthread_condattr_setpshared.c index 3a760cfdf1..a015403cf5 100644 --- a/nptl/pthread_condattr_setpshared.c +++ b/nptl/pthread_condattr_setpshared.c @@ -18,15 +18,16 @@ #include <errno.h> #include <pthreadP.h> +#include <futex-internal.h> int pthread_condattr_setpshared (attr, pshared) pthread_condattr_t *attr; int pshared; { - if (pshared != PTHREAD_PROCESS_PRIVATE - && __builtin_expect (pshared != PTHREAD_PROCESS_SHARED, 0)) - return EINVAL; + int err = futex_supports_pshared (pshared); + if (err != 0) + return err; int *valuep = &((struct pthread_condattr *) attr)->value; |