diff options
author | Artur Grabowski <art@cvs.openbsd.org> | 2007-10-10 15:53:54 +0000 |
---|---|---|
committer | Artur Grabowski <art@cvs.openbsd.org> | 2007-10-10 15:53:54 +0000 |
commit | e51062c8cca21a333603b567563e3b84f74ddac0 (patch) | |
tree | dccf12b7d5ef806260203fe60b2bcaf94260c651 /sys/arch/m88k/include | |
parent | 34c540de32da6090afdcdd6fee481f9a2df345fd (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/m88k/include')
-rw-r--r-- | sys/arch/m88k/include/cpu.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/arch/m88k/include/cpu.h b/sys/arch/m88k/include/cpu.h index 317cc61704f..ab3342c7734 100644 --- a/sys/arch/m88k/include/cpu.h +++ b/sys/arch/m88k/include/cpu.h @@ -1,4 +1,4 @@ -/* $OpenBSD: cpu.h,v 1.22 2007/05/19 20:34:32 miod Exp $ */ +/* $OpenBSD: cpu.h,v 1.23 2007/10/10 15:53:52 art Exp $ */ /* * Copyright (c) 1996 Nivas Madhur * Copyright (c) 1992, 1993 @@ -58,6 +58,7 @@ #include <machine/pcb.h> #include <machine/psl.h> #include <machine/intr.h> +#include <sys/queue.h> #include <sys/sched.h> #if defined(MULTIPROCESSOR) @@ -165,6 +166,8 @@ void set_cpu_number(cpuid_t); #define cpu_exec(p) do { /* nothing */ } while (0) #define cpu_wait(p) do { /* nothing */ } while (0) +#define cpu_idle_cycle() do { /* nothing */ } while (0) + #if defined(MULTIPROCESSOR) #include <sys/lock.h> #include <sys/mplock.h> |