summaryrefslogtreecommitdiffstats
path: root/sys/kern
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2004-12-30 20:29:58 +0000
committerjhb <jhb@FreeBSD.org>2004-12-30 20:29:58 +0000
commit7b611b0cb22347b6dcb39cb97b7826908f188d10 (patch)
tree3db78404a3bf8319128dcd14795f6b1149c927aa /sys/kern
parent5624553de421f01520096aaaedc63434e38c8e31 (diff)
downloadFreeBSD-src-7b611b0cb22347b6dcb39cb97b7826908f188d10.zip
FreeBSD-src-7b611b0cb22347b6dcb39cb97b7826908f188d10.tar.gz
Stop explicitly touching td_base_pri outside of the scheduler and simply
set a thread's priority via sched_prio() when that is the desired action. The schedulers will start managing td_base_pri internally shortly.
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/kern_intr.c7
-rw-r--r--sys/kern/kern_resource.c1
-rw-r--r--sys/kern/kern_synch.c2
3 files changed, 3 insertions, 7 deletions
diff --git a/sys/kern/kern_intr.c b/sys/kern/kern_intr.c
index 936cc30..6f22daa 100644
--- a/sys/kern/kern_intr.c
+++ b/sys/kern/kern_intr.c
@@ -45,6 +45,7 @@ __FBSDID("$FreeBSD$");
#include <sys/proc.h>
#include <sys/random.h>
#include <sys/resourcevar.h>
+#include <sys/sched.h>
#include <sys/sysctl.h>
#include <sys/unistd.h>
#include <sys/vmmeter.h>
@@ -143,14 +144,12 @@ ithread_update(struct ithd *ithd)
ih = TAILQ_FIRST(&ithd->it_handlers);
if (ih == NULL) {
mtx_lock_spin(&sched_lock);
- td->td_priority = PRI_MAX_ITHD;
- td->td_base_pri = PRI_MAX_ITHD;
+ sched_prio(td, PRI_MAX_ITHD);
mtx_unlock_spin(&sched_lock);
return;
}
mtx_lock_spin(&sched_lock);
- td->td_priority = ih->ih_pri;
- td->td_base_pri = ih->ih_pri;
+ sched_prio(td, ih->ih_pri);
mtx_unlock_spin(&sched_lock);
missed = 0;
TAILQ_FOREACH(ih, &ithd->it_handlers, ih_next) {
diff --git a/sys/kern/kern_resource.c b/sys/kern/kern_resource.c
index d9e25c8..7368cbd 100644
--- a/sys/kern/kern_resource.c
+++ b/sys/kern/kern_resource.c
@@ -423,7 +423,6 @@ rtp_to_pri(struct rtprio *rtp, struct ksegrp *kg)
}
sched_class(kg, rtp->type);
if (curthread->td_ksegrp == kg) {
- curthread->td_base_pri = kg->kg_user_pri;
sched_prio(curthread, kg->kg_user_pri); /* XXX dubious */
}
return (0);
diff --git a/sys/kern/kern_synch.c b/sys/kern/kern_synch.c
index bd28c1d..3f5689a 100644
--- a/sys/kern/kern_synch.c
+++ b/sys/kern/kern_synch.c
@@ -212,8 +212,6 @@ msleep(ident, mtx, priority, wmesg, timo)
/*
* Adjust this thread's priority.
- *
- * XXX: do we need to save priority in td_base_pri?
*/
mtx_lock_spin(&sched_lock);
sched_prio(td, priority & PRIMASK);
OpenPOWER on IntegriCloud