summaryrefslogtreecommitdiffstats
path: root/sys/kern/sched_ule.c
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2003-04-22 20:50:38 +0000
committerjhb <jhb@FreeBSD.org>2003-04-22 20:50:38 +0000
commit41837c0a1432e00773a9f7e1c844133dc3f62fc2 (patch)
tree7e1643dec04960e48deaf7881539cca7b70f183e /sys/kern/sched_ule.c
parentced60d737ac0e99b71a066dfb899c47260e50d34 (diff)
downloadFreeBSD-src-41837c0a1432e00773a9f7e1c844133dc3f62fc2.zip
FreeBSD-src-41837c0a1432e00773a9f7e1c844133dc3f62fc2.tar.gz
- Assert that the proc lock and sched_lock are held in sched_nice().
- For the 4BSD scheduler, this means that all callers of the static function resetpriority() now always hold sched_lock, so don't lock sched_lock explicitly in that function.
Diffstat (limited to 'sys/kern/sched_ule.c')
-rw-r--r--sys/kern/sched_ule.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/kern/sched_ule.c b/sys/kern/sched_ule.c
index 1305527..aa40de8 100644
--- a/sys/kern/sched_ule.c
+++ b/sys/kern/sched_ule.c
@@ -693,6 +693,8 @@ sched_nice(struct ksegrp *kg, int nice)
struct thread *td;
struct kseq *kseq;
+ PROC_LOCK_ASSERT(kg->kg_proc, MA_OWNED);
+ mtx_assert(&sched_lock, MA_OWNED);
/*
* We need to adjust the nice counts for running KSEs.
*/
OpenPOWER on IntegriCloud