sched_setscheduler: Return EINVAL when a invalid policy is specified,
thus complying with POLA and the man page. (Previously, no error was returned for this case.)
This commit is contained in:
parent
c08c4e81fc
commit
5949ba2136
@ -228,6 +228,10 @@ int ksched_setscheduler(register_t *ret, struct ksched *ksched,
|
||||
mtx_unlock_spin(&sched_lock);
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
e = EINVAL;
|
||||
break;
|
||||
}
|
||||
|
||||
return e;
|
||||
|
@ -228,6 +228,10 @@ int ksched_setscheduler(register_t *ret, struct ksched *ksched,
|
||||
mtx_unlock_spin(&sched_lock);
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
e = EINVAL;
|
||||
break;
|
||||
}
|
||||
|
||||
return e;
|
||||
|
Loading…
Reference in New Issue
Block a user