summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_resource.c
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2003-04-18 20:17:47 +0000
committerjhb <jhb@FreeBSD.org>2003-04-18 20:17:47 +0000
commitde4c9711d0944c63d082d39ee9e38a4336a72565 (patch)
tree238990ca05d4151eaab734ae7d0d793cb1967b5f /sys/kern/kern_resource.c
parentf043193969c2c48432e0dc376e498e931a546298 (diff)
downloadFreeBSD-src-de4c9711d0944c63d082d39ee9e38a4336a72565.zip
FreeBSD-src-de4c9711d0944c63d082d39ee9e38a4336a72565.tar.gz
Add a couple of sched_lock asserts.
Diffstat (limited to 'sys/kern/kern_resource.c')
-rw-r--r--sys/kern/kern_resource.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/kern/kern_resource.c b/sys/kern/kern_resource.c
index b72520c..5ea8c6c 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;
OpenPOWER on IntegriCloud