From 49f0419e0ec0f15d62331d77328e73ba599e1e54 Mon Sep 17 00:00:00 2001 From: Artur Grabowski Date: Thu, 13 Sep 2001 14:37:53 +0000 Subject: Simplify userret, modelled after alpha. --- sys/arch/i386/i386/trap.c | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) (limited to 'sys') diff --git a/sys/arch/i386/i386/trap.c b/sys/arch/i386/i386/trap.c index 2eb6136dc92..6b0a502f528 100644 --- a/sys/arch/i386/i386/trap.c +++ b/sys/arch/i386/i386/trap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: trap.c,v 1.41 2001/08/12 21:51:03 mickey Exp $ */ +/* $OpenBSD: trap.c,v 1.42 2001/09/13 14:37:52 art Exp $ */ /* $NetBSD: trap.c,v 1.95 1996/05/05 06:50:02 mycroft Exp $ */ /*- @@ -106,7 +106,7 @@ userret(p, pc, oticks) int pc; u_quad_t oticks; { - int sig, s; + int sig; /* take pending signals */ while ((sig = CURSIG(p)) != 0) @@ -114,18 +114,9 @@ userret(p, pc, oticks) p->p_priority = p->p_usrpri; if (want_resched) { /* - * Since we are curproc, a clock interrupt could - * change our priority without changing run queues - * (the running process is not kept on a run queue). - * If this happened after we setrunqueue ourselves but - * before we switch()'ed, we might not be on the queue - * indicated by our priority. + * We're being preempted. */ - s = splstatclock(); - setrunqueue(p); - p->p_stats->p_ru.ru_nivcsw++; - mi_switch(); - splx(s); + preempt(NULL); while ((sig = CURSIG(p)) != 0) postsig(sig); } -- cgit v1.2.3