diff options
Diffstat (limited to 'lib/libpthread/thread/thr_attr_setscope.c')
-rw-r--r-- | lib/libpthread/thread/thr_attr_setscope.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/libpthread/thread/thr_attr_setscope.c b/lib/libpthread/thread/thr_attr_setscope.c index dc9e2dd..70dd69e 100644 --- a/lib/libpthread/thread/thr_attr_setscope.c +++ b/lib/libpthread/thread/thr_attr_setscope.c @@ -45,12 +45,11 @@ _pthread_attr_setscope(pthread_attr_t *attr, int contentionscope) if ((attr == NULL) || (*attr == NULL)) { /* Return an invalid argument: */ ret = EINVAL; - } else if ((contentionscope != PTHREAD_SCOPE_PROCESS) || - (contentionscope == PTHREAD_SCOPE_SYSTEM)) { - /* We don't support PTHREAD_SCOPE_SYSTEM. */ - ret = ENOTSUP; + } else if ((contentionscope != PTHREAD_SCOPE_PROCESS) && + (contentionscope != PTHREAD_SCOPE_SYSTEM)) { + ret = EINVAL; } else (*attr)->flags |= contentionscope; - return(ret); + return (ret); } |