diff options
author | Artur Grabowski <art@cvs.openbsd.org> | 2001-09-13 14:37:53 +0000 |
---|---|---|
committer | Artur Grabowski <art@cvs.openbsd.org> | 2001-09-13 14:37:53 +0000 |
commit | 49f0419e0ec0f15d62331d77328e73ba599e1e54 (patch) | |
tree | 0e9ba121896dd7a327e8bcf830dfc46e3bf34b30 | |
parent | 7fb1f3ae79c4404d80a7698141837fe4f0804bb3 (diff) |
Simplify userret, modelled after alpha.
-rw-r--r-- | sys/arch/i386/i386/trap.c | 17 |
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); } |