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
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=120033
@ -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