diff options
author | davidxu <davidxu@FreeBSD.org> | 2003-09-14 22:32:28 +0000 |
---|---|---|
committer | davidxu <davidxu@FreeBSD.org> | 2003-09-14 22:32:28 +0000 |
commit | b117b7ad58e82b1aa2614c11103eaf337dae0202 (patch) | |
tree | 83846d79abc00580924f7f3238800e207964dc40 /lib/libkse | |
parent | ecc9826d1b06bcd6eea61f261307f051a1fa80fa (diff) | |
download | FreeBSD-src-b117b7ad58e82b1aa2614c11103eaf337dae0202.zip FreeBSD-src-b117b7ad58e82b1aa2614c11103eaf337dae0202.tar.gz |
If user is seting scope process flag, clear PTHREAD_SCOPE_SYSTEM bit
accordingly.
Reviewed by: deischen
Diffstat (limited to 'lib/libkse')
-rw-r--r-- | lib/libkse/thread/thr_attr_setscope.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/libkse/thread/thr_attr_setscope.c b/lib/libkse/thread/thr_attr_setscope.c index 70dd69e..dcf179e 100644 --- a/lib/libkse/thread/thr_attr_setscope.c +++ b/lib/libkse/thread/thr_attr_setscope.c @@ -48,8 +48,10 @@ _pthread_attr_setscope(pthread_attr_t *attr, int contentionscope) } else if ((contentionscope != PTHREAD_SCOPE_PROCESS) && (contentionscope != PTHREAD_SCOPE_SYSTEM)) { ret = EINVAL; - } else + } else if (contentionscope == PTHREAD_SCOPE_SYSTEM) { (*attr)->flags |= contentionscope; - + } else { + (*attr)->flags &= ~PTHREAD_SCOPE_SYSTEM; + } return (ret); } |