summaryrefslogtreecommitdiffstats
path: root/sys/geom/geom_kern.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/geom/geom_kern.c')
-rw-r--r--sys/geom/geom_kern.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/sys/geom/geom_kern.c b/sys/geom/geom_kern.c
index 762a1fd..6e6b301 100644
--- a/sys/geom/geom_kern.c
+++ b/sys/geom/geom_kern.c
@@ -47,8 +47,9 @@ __FBSDID("$FreeBSD$");
#include <sys/kthread.h>
#include <sys/lock.h>
#include <sys/mutex.h>
-#include <sys/sx.h>
#include <sys/sbuf.h>
+#include <sys/sched.h>
+#include <sys/sx.h>
#include <geom/geom.h>
#include <geom/geom_int.h>
@@ -87,7 +88,9 @@ g_up_procbody(void)
struct thread *tp = FIRST_THREAD_IN_PROC(p);
mtx_assert(&Giant, MA_NOTOWNED);
- tp->td_base_pri = PRIBIO;
+ mtx_lock_spin(&sched_lock);
+ sched_prio(tp, PRIBIO);
+ mtx_unlock_spin(&sched_lock);
for(;;) {
g_io_schedule_up(tp);
}
@@ -108,7 +111,9 @@ g_down_procbody(void)
struct thread *tp = FIRST_THREAD_IN_PROC(p);
mtx_assert(&Giant, MA_NOTOWNED);
- tp->td_base_pri = PRIBIO;
+ mtx_lock_spin(&sched_lock);
+ sched_prio(tp, PRIBIO);
+ mtx_unlock_spin(&sched_lock);
for(;;) {
g_io_schedule_down(tp);
}
@@ -129,7 +134,9 @@ g_event_procbody(void)
struct thread *tp = FIRST_THREAD_IN_PROC(p);
mtx_assert(&Giant, MA_NOTOWNED);
- tp->td_base_pri = PRIBIO;
+ mtx_lock_spin(&sched_lock);
+ sched_prio(tp, PRIBIO);
+ mtx_unlock_spin(&sched_lock);
for(;;) {
g_run_events();
tsleep(&g_wait_event, PRIBIO, "-", hz/10);
OpenPOWER on IntegriCloud