diff options
Diffstat (limited to 'lib/libpthread/thread/thr_attr_setscope.c')
-rw-r--r-- | lib/libpthread/thread/thr_attr_setscope.c | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/lib/libpthread/thread/thr_attr_setscope.c b/lib/libpthread/thread/thr_attr_setscope.c index 84239d7..de2fe8e 100644 --- a/lib/libpthread/thread/thr_attr_setscope.c +++ b/lib/libpthread/thread/thr_attr_setscope.c @@ -41,21 +41,14 @@ pthread_attr_setscope(pthread_attr_t *attr, int contentionscope) { int ret = 0; - if ((attr == NULL) || (*attr == NULL) || - (contentionscope != PTHREAD_SCOPE_PROCESS) || - (contentionscope != PTHREAD_SCOPE_SYSTEM)) + if ((attr == NULL) || (*attr == NULL)) { /* Return an invalid argument: */ ret = EINVAL; - - else if (contentionscope == PTHREAD_SCOPE_SYSTEM) - /* We don't support system wide contention: */ -#ifdef NOT_YET + } else if ((contentionscope != PTHREAD_SCOPE_PROCESS) || + (contentionscope != PTHREAD_SCOPE_SYSTEM)) { + /* We don't support PTHREAD_SCOPE_SYSTEM. */ ret = ENOTSUP; -#else - ret = EOPNOTSUPP; -#endif - - else + } else (*attr)->flags |= contentionscope; return(ret); |