summaryrefslogtreecommitdiff
path: root/sys/kern/kern_resource.c
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2003-04-18 20:17:47 +0000
committerJohn Baldwin <jhb@FreeBSD.org>2003-04-18 20:17:47 +0000
commit08865ba1d115241fe407f9d098f378fa6bb1a5c2 (patch)
tree238990ca05d4151eaab734ae7d0d793cb1967b5f /sys/kern/kern_resource.c
parent02e878d97c9cdc020dce17486c454bed5a2cb477 (diff)
Notes
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 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;