diff options
Diffstat (limited to 'lib/libpthread/thread/thr_attr_setschedparam.c')
| -rw-r--r-- | lib/libpthread/thread/thr_attr_setschedparam.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/libpthread/thread/thr_attr_setschedparam.c b/lib/libpthread/thread/thr_attr_setschedparam.c index 6c4166b1784a..755bb13b7acc 100644 --- a/lib/libpthread/thread/thr_attr_setschedparam.c +++ b/lib/libpthread/thread/thr_attr_setschedparam.c @@ -45,6 +45,10 @@ pthread_attr_setschedparam(pthread_attr_t *attr, const struct sched_param *param ret = EINVAL; else if (param == NULL) { ret = ENOTSUP; + } else if ((param->sched_priority < PTHREAD_MIN_PRIORITY) || + (param->sched_priority > PTHREAD_MAX_PRIORITY)) { + /* Return an unsupported value error. */ + ret = ENOTSUP; } else (*attr)->prio = param->sched_priority; |
