diff options
author | dillon <dillon@FreeBSD.org> | 2002-04-01 23:51:23 +0000 |
---|---|---|
committer | dillon <dillon@FreeBSD.org> | 2002-04-01 23:51:23 +0000 |
commit | 3ad295d41646d81ef12f3b5e99af833ef91f660f (patch) | |
tree | ec7d3de3f9fac7137b9779c10d8281315efa3647 /sys/kern | |
parent | a683bcc9224326e9d7bbf72dc76abaefe8a1d62b (diff) | |
download | FreeBSD-src-3ad295d41646d81ef12f3b5e99af833ef91f660f.zip FreeBSD-src-3ad295d41646d81ef12f3b5e99af833ef91f660f.tar.gz |
Stage-2 commit of the critical*() code. This re-inlines cpu_critical_enter()
and cpu_critical_exit() and moves associated critical prototypes into their
own header file, <arch>/<arch>/critical.h, which is only included by the
three MI source files that need it.
Backout and re-apply improperly comitted syntactical cleanups made to files
that were still under active development. Backout improperly comitted program
structure changes that moved localized declarations to the top of two
procedures. Partially re-apply one of the program structure changes to
move 'mask' into an intermediate block rather then in three separate
sub-blocks to make the code more readable. Re-integrate bug fixes that Jake
made to the sparc64 code.
Note: In general, developers should not gratuitously move declarations out
of sub-blocks. They are where they are for reasons of structure, grouping,
readability, compiler-localizability, and to avoid developer-introduced bugs
similar to several found in recent years in the VFS and VM code.
Reviewed by: jake
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/kern_fork.c | 1 | ||||
-rw-r--r-- | sys/kern/kern_proc.c | 1 | ||||
-rw-r--r-- | sys/kern/kern_switch.c | 1 |
3 files changed, 3 insertions, 0 deletions
diff --git a/sys/kern/kern_fork.c b/sys/kern/kern_fork.c index ddd962a..8782007 100644 --- a/sys/kern/kern_fork.c +++ b/sys/kern/kern_fork.c @@ -70,6 +70,7 @@ #include <sys/vmmeter.h> #include <sys/user.h> +#include <machine/critical.h> static MALLOC_DEFINE(M_ATFORK, "atfork", "atfork callback"); diff --git a/sys/kern/kern_proc.c b/sys/kern/kern_proc.c index a1620bc..7e62eff 100644 --- a/sys/kern/kern_proc.c +++ b/sys/kern/kern_proc.c @@ -54,6 +54,7 @@ #include <vm/pmap.h> #include <vm/vm_map.h> #include <vm/uma.h> +#include <machine/critical.h> MALLOC_DEFINE(M_PGRP, "pgrp", "process group header"); MALLOC_DEFINE(M_SESSION, "session", "session header"); diff --git a/sys/kern/kern_switch.c b/sys/kern/kern_switch.c index ccfb114..1b33f28 100644 --- a/sys/kern/kern_switch.c +++ b/sys/kern/kern_switch.c @@ -34,6 +34,7 @@ #include <sys/mutex.h> #include <sys/proc.h> #include <sys/queue.h> +#include <machine/critical.h> /* * Global run queue. |