summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/i386/i386/trap.c17
1 files changed, 4 insertions, 13 deletions
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);
}