summaryrefslogtreecommitdiff
path: root/sysdeps/sparc/nptl/pthread_barrier_init.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/sparc/nptl/pthread_barrier_init.c')
-rw-r--r--sysdeps/sparc/nptl/pthread_barrier_init.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/sysdeps/sparc/nptl/pthread_barrier_init.c b/sysdeps/sparc/nptl/pthread_barrier_init.c
index aa21a63f2d..86ec7d0348 100644
--- a/sysdeps/sparc/nptl/pthread_barrier_init.c
+++ b/sysdeps/sparc/nptl/pthread_barrier_init.c
@@ -35,10 +35,9 @@ __pthread_barrier_init (barrier, attr, count)
struct pthread_barrierattr *iattr = (struct pthread_barrierattr *) attr;
if (iattr != NULL)
{
- if (iattr->pshared != PTHREAD_PROCESS_PRIVATE
- && __builtin_expect (iattr->pshared != PTHREAD_PROCESS_SHARED, 0))
- /* Invalid attribute. */
- return EINVAL;
+ int err = futex_supports_pshared (iattr->pshared);
+ if (err != 0)
+ return err;
}
ibarrier = (union sparc_pthread_barrier *) barrier;