diff options
Diffstat (limited to 'nptl/pthread_mutexattr_setpshared.c')
-rw-r--r-- | nptl/pthread_mutexattr_setpshared.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/nptl/pthread_mutexattr_setpshared.c b/nptl/pthread_mutexattr_setpshared.c index 77ee9f794f..62fd168265 100644 --- a/nptl/pthread_mutexattr_setpshared.c +++ b/nptl/pthread_mutexattr_setpshared.c @@ -18,6 +18,7 @@ #include <errno.h> #include <pthreadP.h> +#include <futex-internal.h> int @@ -27,9 +28,9 @@ pthread_mutexattr_setpshared (attr, pshared) { struct pthread_mutexattr *iattr; - 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; iattr = (struct pthread_mutexattr *) attr; |