Add a couple of sched_lock asserts.

This commit is contained in:
John Baldwin 2003-04-18 20:17:47 +00:00
parent 02e878d97c
commit 08865ba1d1

View File

@ -392,6 +392,7 @@ int
rtp_to_pri(struct rtprio *rtp, struct ksegrp *kg)
{
mtx_assert(&sched_lock, MA_OWNED);
if (rtp->prio > RTP_PRIO_MAX)
return (EINVAL);
switch (RTP_PRIO_BASE(rtp->type)) {
@ -419,6 +420,7 @@ void
pri_to_rtp(struct ksegrp *kg, struct rtprio *rtp)
{
mtx_assert(&sched_lock, MA_OWNED);
switch (PRI_BASE(kg->kg_pri_class)) {
case PRI_REALTIME:
rtp->prio = kg->kg_user_pri - PRI_MIN_REALTIME;