diff options
| author | John Baldwin <jhb@FreeBSD.org> | 2000-08-23 03:22:31 +0000 |
|---|---|---|
| committer | John Baldwin <jhb@FreeBSD.org> | 2000-08-23 03:22:31 +0000 |
| commit | 85541729bf3a25b4db82be98b249b714f7f63ea4 (patch) | |
| tree | ae78d4587e22862744d4a459f257ff1a53a0c39c /lib/libc_r/uthread/uthread_setschedparam.c | |
| parent | 95eeaabef1765dca1fed5980321f7e95916db087 (diff) | |
Notes
Diffstat (limited to 'lib/libc_r/uthread/uthread_setschedparam.c')
| -rw-r--r-- | lib/libc_r/uthread/uthread_setschedparam.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/libc_r/uthread/uthread_setschedparam.c b/lib/libc_r/uthread/uthread_setschedparam.c index f080d5ddba57..bce965fe6603 100644 --- a/lib/libc_r/uthread/uthread_setschedparam.c +++ b/lib/libc_r/uthread/uthread_setschedparam.c @@ -43,14 +43,16 @@ pthread_setschedparam(pthread_t pthread, int policy, { int old_prio, in_readyq = 0, ret = 0; - if ((param == NULL) || (param->sched_priority < PTHREAD_MIN_PRIORITY) || - (param->sched_priority > PTHREAD_MAX_PRIORITY) || - (policy < SCHED_FIFO) || (policy > SCHED_RR)) + if ((param == NULL) || (policy < SCHED_FIFO) || (policy > SCHED_RR)) { /* Return an invalid argument error: */ ret = EINVAL; + } else if ((param->sched_priority < PTHREAD_MIN_PRIORITY) || + (param->sched_priority > PTHREAD_MAX_PRIORITY)) { + /* Return an unsupported value error. */ + ret = ENOTSUP; /* Find the thread in the list of active threads: */ - else if ((ret = _find_thread(pthread)) == 0) { + } else if ((ret = _find_thread(pthread)) == 0) { /* * Defer signals to protect the scheduling queues from * access by the signal handler: |
