summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_resource.c
diff options
context:
space:
mode:
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