summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArtur Grabowski <art@cvs.openbsd.org>2001-09-14 09:39:54 +0000
committerArtur Grabowski <art@cvs.openbsd.org>2001-09-14 09:39:54 +0000
commite6eac19d50a42f564082d65f93998f5ead45575a (patch)
tree58648f412ba5f43a00476fe5b28d97cdabd76a2a
parent4f2541b79e62804388cef2df0a3ea2a4828b8615 (diff)
Simplify userret.
-rw-r--r--sys/arch/sparc/sparc/trap.c17
1 files changed, 4 insertions, 13 deletions
diff --git a/sys/arch/sparc/sparc/trap.c b/sys/arch/sparc/sparc/trap.c
index 05d1abb3b1b..14e12abad58 100644
--- a/sys/arch/sparc/sparc/trap.c
+++ b/sys/arch/sparc/sparc/trap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: trap.c,v 1.30 2001/06/25 00:43:17 mickey Exp $ */
+/* $OpenBSD: trap.c,v 1.31 2001/09/14 09:39:53 art Exp $ */
/* $NetBSD: trap.c,v 1.58 1997/09/12 08:55:01 pk Exp $ */
/*
@@ -213,7 +213,7 @@ userret(p, pc, oticks)
int pc;
u_quad_t oticks;
{
- int sig, s;
+ int sig;
/* take pending signals */
while ((sig = CURSIG(p)) != 0)
@@ -228,18 +228,9 @@ userret(p, pc, 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 switched, 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);
}