diff options
author | jhb <jhb@FreeBSD.org> | 2004-12-30 20:29:58 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2004-12-30 20:29:58 +0000 |
commit | 7b611b0cb22347b6dcb39cb97b7826908f188d10 (patch) | |
tree | 3db78404a3bf8319128dcd14795f6b1149c927aa /sys/dev/md | |
parent | 5624553de421f01520096aaaedc63434e38c8e31 (diff) | |
download | FreeBSD-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/dev/md')
-rw-r--r-- | sys/dev/md/md.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/dev/md/md.c b/sys/dev/md/md.c index 8c35d85..550fd5f 100644 --- a/sys/dev/md/md.c +++ b/sys/dev/md/md.c @@ -71,6 +71,7 @@ #include <sys/namei.h> #include <sys/proc.h> #include <sys/queue.h> +#include <sys/sched.h> #include <sys/sf_buf.h> #include <sys/sysctl.h> #include <sys/vnode.h> @@ -618,7 +619,9 @@ md_kthread(void *arg) int error, hasgiant; sc = arg; - curthread->td_base_pri = PRIBIO; + mtx_lock_spin(&sched_lock); + sched_prio(curthread, PRIBIO); + mtx_unlock_spin(&sched_lock); switch (sc->type) { case MD_VNODE: |