summaryrefslogtreecommitdiff
path: root/lib/libpthread/thread/thr_attr_setscope.c
diff options
context:
space:
mode:
authorJason Evans <jasone@FreeBSD.org>2000-05-02 06:51:40 +0000
committerJason Evans <jasone@FreeBSD.org>2000-05-02 06:51:40 +0000
commit4c089f4dffe2205b8c8833d43180fbde6d42d9e7 (patch)
tree38805ba5432d7b1c6b57979a58a7041d2bfbe944 /lib/libpthread/thread/thr_attr_setscope.c
parent2b91ff7819ded094a0356e6ba4e2164d467ae720 (diff)
Notes
Diffstat (limited to 'lib/libpthread/thread/thr_attr_setscope.c')
-rw-r--r--lib/libpthread/thread/thr_attr_setscope.c17
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 84239d7f6613..de2fe8e4ac4d 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);