summaryrefslogtreecommitdiffstats
path: root/lib/libc_r/uthread/uthread_attr_setscope.c
diff options
context:
space:
mode:
authorjasone <jasone@FreeBSD.org>2000-05-02 06:51:40 +0000
committerjasone <jasone@FreeBSD.org>2000-05-02 06:51:40 +0000
commit03d029f134f6886d414e869610af3f09054ef37e (patch)
treed5f8485897f9957f144321659a45c86542f4d63d /lib/libc_r/uthread/uthread_attr_setscope.c
parent548e56c9d24f4f96bf7751d190bf456f023ac145 (diff)
downloadFreeBSD-src-03d029f134f6886d414e869610af3f09054ef37e.zip
FreeBSD-src-03d029f134f6886d414e869610af3f09054ef37e.tar.gz
Add missing man pages. Fix various compliance bugs, mostly having to do with
error return values. Implement pthread_mutexattr_gettype(). PR: docs/16537, docs/17538
Diffstat (limited to 'lib/libc_r/uthread/uthread_attr_setscope.c')
-rw-r--r--lib/libc_r/uthread/uthread_attr_setscope.c17
1 files changed, 5 insertions, 12 deletions
diff --git a/lib/libc_r/uthread/uthread_attr_setscope.c b/lib/libc_r/uthread/uthread_attr_setscope.c
index 84239d7..de2fe8e 100644
--- a/lib/libc_r/uthread/uthread_attr_setscope.c
+++ b/lib/libc_r/uthread/uthread_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);
OpenPOWER on IntegriCloud