summaryrefslogtreecommitdiff
path: root/sys/arch/mips64
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2005-05-29 03:20:44 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2005-05-29 03:20:44 +0000
commit93c77ad51e4fcc28584bb93f63dd48a4a6c771ec (patch)
tree0198ee58bab354860cf7d00f461d33143ff1aa7f /sys/arch/mips64
parent171f684dab1e3ccc2da4ee86219e9396e8e38e55 (diff)
sched work by niklas and art backed out; causes panics
Diffstat (limited to 'sys/arch/mips64')
-rw-r--r--sys/arch/mips64/mips64/interrupt.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/sys/arch/mips64/mips64/interrupt.c b/sys/arch/mips64/mips64/interrupt.c
index 95ea6c0ef8f..a8a748fd2de 100644
--- a/sys/arch/mips64/mips64/interrupt.c
+++ b/sys/arch/mips64/mips64/interrupt.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: interrupt.c,v 1.12 2005/05/25 23:17:47 niklas Exp $ */
+/* $OpenBSD: interrupt.c,v 1.13 2005/05/29 03:20:40 deraadt Exp $ */
/*
* Copyright (c) 2001-2004 Opsycon AB (www.opsycon.se / www.opsycon.com)
@@ -282,10 +282,21 @@ softintr()
ADDUPROF(p);
}
if (want_resched) {
+ int s;
+
/*
- * We're being preempted.
+ * 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.
*/
- preempt(NULL);
+ s = splstatclock();
+ setrunqueue(p);
+ p->p_stats->p_ru.ru_nivcsw++;
+ mi_switch();
+ splx(s);
while ((sig = CURSIG(p)) != 0)
postsig(sig);
}