summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2004-09-16 09:58:57 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2004-09-16 09:58:57 +0000
commit8bd3aa5b61d8a3d9d74b3b28803e89c0e8bc468d (patch)
tree6e3b64ffc86d072d7afa70871dd5cb57abf372b2 /sys/arch
parentbd2f1452a52ab1f032019313283d45f48e6eb2d7 (diff)
Use preempt() instead of rolling our own version.
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/mips64/mips64/trap.c34
1 files changed, 3 insertions, 31 deletions
diff --git a/sys/arch/mips64/mips64/trap.c b/sys/arch/mips64/mips64/trap.c
index 3e07b068cea..fd9e07a1d53 100644
--- a/sys/arch/mips64/mips64/trap.c
+++ b/sys/arch/mips64/mips64/trap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: trap.c,v 1.6 2004/09/16 07:25:26 miod Exp $ */
+/* $OpenBSD: trap.c,v 1.7 2004/09/16 09:58:56 miod Exp $ */
/* tracked to 1.23 */
/*
@@ -747,21 +747,7 @@ out:
p->p_priority = p->p_usrpri;
astpending = 0;
if (want_resched) {
- int s;
-
- /*
- * 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.
- */
- s = splstatclock();
- setrunqueue(p);
- p->p_stats->p_ru.ru_nivcsw++;
- mi_switch();
- splx(s);
+ preempt(NULL);
while ((i = CURSIG(p)) != 0)
postsig(i);
}
@@ -798,21 +784,7 @@ child_return(arg)
p->p_priority = p->p_usrpri;
astpending = 0;
if (want_resched) {
- int s;
-
- /*
- * 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.
- */
- s = splstatclock();
- setrunqueue(p);
- p->p_stats->p_ru.ru_nivcsw++;
- mi_switch();
- splx(s);
+ preempt(NULL);
while ((i = CURSIG(p)) != 0)
postsig(i);
}