summaryrefslogtreecommitdiffstats
path: root/sys/sun4v
diff options
context:
space:
mode:
authorjeff <jeff@FreeBSD.org>2008-03-10 01:32:48 +0000
committerjeff <jeff@FreeBSD.org>2008-03-10 01:32:48 +0000
commitd952a04ecfe6f5305491292ff2c9c44059c51e82 (patch)
treedaf5c735a933eb2c106e64a800d5762e72523038 /sys/sun4v
parent7dc7c824eeadf8c9af5f349f380e2d273475383a (diff)
downloadFreeBSD-src-d952a04ecfe6f5305491292ff2c9c44059c51e82.zip
FreeBSD-src-d952a04ecfe6f5305491292ff2c9c44059c51e82.tar.gz
- Rather than repeating the same preemption code everywhere call the scheduler
specific sched_preempt() routine.
Diffstat (limited to 'sys/sun4v')
-rw-r--r--sys/sun4v/sun4v/mp_machdep.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/sys/sun4v/sun4v/mp_machdep.c b/sys/sun4v/sun4v/mp_machdep.c
index e59679a..8bd4ba6 100644
--- a/sys/sun4v/sun4v/mp_machdep.c
+++ b/sys/sun4v/sun4v/mp_machdep.c
@@ -461,14 +461,7 @@ cpu_ipi_stop(struct trapframe *tf)
void
cpu_ipi_preempt(struct trapframe *tf)
{
- struct thread *running_thread = curthread;
-
- thread_lock(running_thread);
- if (running_thread->td_critnest > 1)
- running_thread->td_owepreempt = 1;
- else
- mi_switch(SW_INVOL | SW_PREEMPT, NULL);
- thread_unlock(running_thread);
+ sched_preempt(curthread);
}
void
OpenPOWER on IntegriCloud