From 08865ba1d115241fe407f9d098f378fa6bb1a5c2 Mon Sep 17 00:00:00 2001 From: John Baldwin Date: Fri, 18 Apr 2003 20:17:47 +0000 Subject: [PATCH] Add a couple of sched_lock asserts. --- sys/kern/kern_resource.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/kern/kern_resource.c b/sys/kern/kern_resource.c index b72520c8b1e0..5ea8c6c12ae2 100644 --- a/sys/kern/kern_resource.c +++ b/sys/kern/kern_resource.c @@ -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;