diff options
Diffstat (limited to 'lib/libpthread/thread/thr_attr_setschedparam.c')
-rw-r--r-- | lib/libpthread/thread/thr_attr_setschedparam.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/libpthread/thread/thr_attr_setschedparam.c b/lib/libpthread/thread/thr_attr_setschedparam.c index 5746fe2..6c4166b 100644 --- a/lib/libpthread/thread/thr_attr_setschedparam.c +++ b/lib/libpthread/thread/thr_attr_setschedparam.c @@ -41,9 +41,11 @@ pthread_attr_setschedparam(pthread_attr_t *attr, const struct sched_param *param { int ret = 0; - if ((attr == NULL) || (*attr == NULL) || (param == NULL)) + if ((attr == NULL) || (*attr == NULL)) ret = EINVAL; - else + else if (param == NULL) { + ret = ENOTSUP; + } else (*attr)->prio = param->sched_priority; return(ret); |