summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorArtur Grabowski <art@cvs.openbsd.org>2001-09-14 09:12:22 +0000
committerArtur Grabowski <art@cvs.openbsd.org>2001-09-14 09:12:22 +0000
commit80165ce0bdcb7b80ccadff98733c2593f368543b (patch)
tree6dbf1ffe91937aa99647935fa41de35a7b581cc0 /sys
parenta77f8a88834a7fe3e7630ea04e4e475dda9e2448 (diff)
Unbreak trap(), simplify userret().
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/sun3/sun3/trap.c19
1 files changed, 5 insertions, 14 deletions
diff --git a/sys/arch/sun3/sun3/trap.c b/sys/arch/sun3/sun3/trap.c
index 11baefa5b25..f5f3c079285 100644
--- a/sys/arch/sun3/sun3/trap.c
+++ b/sys/arch/sun3/sun3/trap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: trap.c,v 1.25 2001/06/27 04:44:04 art Exp $ */
+/* $OpenBSD: trap.c,v 1.26 2001/09/14 09:12:21 art Exp $ */
/* $NetBSD: trap.c,v 1.63-1.65ish 1997/01/16 15:41:40 gwr Exp $ */
/*
@@ -153,7 +153,7 @@ userret(p, fp, oticks)
register struct frame *fp;
u_quad_t oticks;
{
- int sig, s;
+ int sig;
/* take pending signals */
while ((sig = CURSIG(p)) != 0)
@@ -163,18 +163,9 @@ userret(p, fp, oticks)
if (want_resched) {
/*
- * Since we are curproc, clock will normally just change
- * our priority without moving us from one queue to another
- * (since the running process is not on a queue.)
- * If that happened after we put ourselves on the run queue
- * but before we mi_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);
}
@@ -260,7 +251,7 @@ trap(type, code, v, frame)
*/
panic("trap during panic!");
}
- regdump(&frame, 128);
+ regdump((struct trapframe *)&frame, 128);
type &= ~T_USER;
if ((u_int)type < trap_types)
panic(trap_type[type]);