diff options
| author | Jason Evans <jasone@FreeBSD.org> | 2000-05-02 06:51:40 +0000 |
|---|---|---|
| committer | Jason Evans <jasone@FreeBSD.org> | 2000-05-02 06:51:40 +0000 |
| commit | 4c089f4dffe2205b8c8833d43180fbde6d42d9e7 (patch) | |
| tree | 38805ba5432d7b1c6b57979a58a7041d2bfbe944 /lib/libpthread/thread/thr_setschedparam.c | |
| parent | 2b91ff7819ded094a0356e6ba4e2164d467ae720 (diff) | |
Notes
Diffstat (limited to 'lib/libpthread/thread/thr_setschedparam.c')
| -rw-r--r-- | lib/libpthread/thread/thr_setschedparam.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/libpthread/thread/thr_setschedparam.c b/lib/libpthread/thread/thr_setschedparam.c index f080d5ddba57..bce965fe6603 100644 --- a/lib/libpthread/thread/thr_setschedparam.c +++ b/lib/libpthread/thread/thr_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: |
