diff options
author | jasone <jasone@FreeBSD.org> | 2000-05-02 06:51:40 +0000 |
---|---|---|
committer | jasone <jasone@FreeBSD.org> | 2000-05-02 06:51:40 +0000 |
commit | 03d029f134f6886d414e869610af3f09054ef37e (patch) | |
tree | d5f8485897f9957f144321659a45c86542f4d63d /lib/libkse/thread/thr_attr_setschedpolicy.c | |
parent | 548e56c9d24f4f96bf7751d190bf456f023ac145 (diff) | |
download | FreeBSD-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/libkse/thread/thr_attr_setschedpolicy.c')
-rw-r--r-- | lib/libkse/thread/thr_attr_setschedpolicy.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/libkse/thread/thr_attr_setschedpolicy.c b/lib/libkse/thread/thr_attr_setschedpolicy.c index 640cb38..2788deb 100644 --- a/lib/libkse/thread/thr_attr_setschedpolicy.c +++ b/lib/libkse/thread/thr_attr_setschedpolicy.c @@ -41,10 +41,11 @@ pthread_attr_setschedpolicy(pthread_attr_t *attr, int policy) { int ret = 0; - if ((attr == NULL) || (*attr == NULL) || (policy < SCHED_FIFO) || - (policy > SCHED_RR)) + if ((attr == NULL) || (*attr == NULL)) ret = EINVAL; - else + else if ((policy < SCHED_FIFO) || (policy > SCHED_RR)) { + ret = ENOTSUP; + } else (*attr)->sched_policy = policy; return(ret); |