summaryrefslogtreecommitdiff
path: root/lib/libpthread/thread/thr_attr_setschedparam.c
diff options
context:
space:
mode:
authorDaniel Eischen <deischen@FreeBSD.org>2000-10-13 22:12:32 +0000
committerDaniel Eischen <deischen@FreeBSD.org>2000-10-13 22:12:32 +0000
commitfbeb36e4bf72161883eda56a41578de1d8f2f885 (patch)
tree06c51ea3d094e4b4c0492667aa46cf83d9e938c6 /lib/libpthread/thread/thr_attr_setschedparam.c
parenta95b77ec78e646b4b781d4b498bc3be7ddaee44c (diff)
Notes
Diffstat (limited to 'lib/libpthread/thread/thr_attr_setschedparam.c')
-rw-r--r--lib/libpthread/thread/thr_attr_setschedparam.c4
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;