summaryrefslogtreecommitdiff
path: root/sys/arch/vax/include/cpu.h
diff options
context:
space:
mode:
authorArtur Grabowski <art@cvs.openbsd.org>2007-10-10 15:53:54 +0000
committerArtur Grabowski <art@cvs.openbsd.org>2007-10-10 15:53:54 +0000
commite51062c8cca21a333603b567563e3b84f74ddac0 (patch)
treedccf12b7d5ef806260203fe60b2bcaf94260c651 /sys/arch/vax/include/cpu.h
parent34c540de32da6090afdcdd6fee481f9a2df345fd (diff)
Make context switching much more MI:
- Move the functionality of choosing a process from cpu_switch into a much simpler function: cpu_switchto. Instead of having the locore code walk the run queues, let the MI code choose the process we want to run and only implement the context switching itself in MD code. - Let MD context switching run without worrying about spls or locks. - Instead of having the idle loop implemented with special contexts in MD code, implement one idle proc for each cpu. make the idle loop MI with MD hooks. - Change the proc lists from the old style vax queues to TAILQs. - Change the sleep queue from vax queues to TAILQs. This makes wakeup() go from O(n^2) to O(n) there will be some MD fallout, but it will be fixed shortly. There's also a few cleanups to be done after this. deraadt@, kettenis@ ok
Diffstat (limited to 'sys/arch/vax/include/cpu.h')
-rw-r--r--sys/arch/vax/include/cpu.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/arch/vax/include/cpu.h b/sys/arch/vax/include/cpu.h
index 80b05d5d185..dc6ec203a16 100644
--- a/sys/arch/vax/include/cpu.h
+++ b/sys/arch/vax/include/cpu.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: cpu.h,v 1.25 2007/05/16 05:19:13 miod Exp $ */
+/* $OpenBSD: cpu.h,v 1.26 2007/10/10 15:53:53 art Exp $ */
/* $NetBSD: cpu.h,v 1.41 1999/10/21 20:01:36 ragge Exp $ */
/*
@@ -129,6 +129,10 @@ extern int want_resched; /* resched() was called */
*/
#define need_proftick(p) mtpr(AST_OK,PR_ASTLVL)
+#define cpu_idle_enter() do { /* nothing */ } while (0)
+#define cpu_idle_cycle() do { /* nothing */ } while (0)
+#define cpu_idle_leave() do { /* nothing */ } while (0)
+
/*
* This defines the I/O device register space size in pages.
*/