]> Zhao Yanbai Git Server - minix.git/commitdiff
Kernel: clean up include statements a bit
authorDavid van Moolenbroek <david@minix3.org>
Tue, 14 Aug 2012 16:29:05 +0000 (16:29 +0000)
committerDavid van Moolenbroek <david@minix3.org>
Tue, 14 Aug 2012 16:29:05 +0000 (16:29 +0000)
Coverity was flagging a recursive include between kernel.h and
cpulocals.h. As cpulocals.h also included proc.h, we can move that
include statement into kernel.h, and clean up the source files'
include statements accordingly.

23 files changed:
kernel/arch/i386/apic.c
kernel/arch/i386/arch_clock.c
kernel/arch/i386/arch_reset.c
kernel/arch/i386/arch_smp.c
kernel/arch/i386/arch_system.c
kernel/arch/i386/exception.c
kernel/arch/i386/head.S
kernel/arch/i386/i8259.c
kernel/arch/i386/memory.c
kernel/arch/i386/procoffsets.cf
kernel/arch/i386/protect.c
kernel/clock.c
kernel/cpulocals.h
kernel/debug.c
kernel/interrupt.c
kernel/kernel.h
kernel/main.c
kernel/proc.c
kernel/profile.c
kernel/system.c
kernel/system.h
kernel/table.c
kernel/utility.c

index 5c652c0a988266fa036b68a9f298a7ba4b0aee7b..ffbbdb98cf0204ac548c416c047c16bdb9bc18c0 100644 (file)
@@ -10,8 +10,6 @@
 #include <minix/syslib.h>
 #include <machine/cmos.h>
 
-#include "kernel/proc.h"
-#include "kernel/glo.h"
 #include "arch_proto.h"
 
 #include <minix/u64.h>
index 692a95d92dc9cf60c26577dc05d54dc835a48817..b7b7c1ec3b0fe434a3216ad12a2de46288690f1d 100644 (file)
@@ -7,7 +7,6 @@
 #include "kernel/kernel.h"
 
 #include "kernel/clock.h"
-#include "kernel/proc.h"
 #include "kernel/interrupt.h"
 #include <minix/u64.h>
 #include "glo.h"
index 7891abe4203076dbbb3dfc47ecf143cfd1156c9c..26e579a60c74ac88390702ad3eff0f8ece997c8a 100644 (file)
@@ -19,8 +19,6 @@
 #include "arch_proto.h"
 #include "serial.h"
 #include "oxpcie.h"
-#include "kernel/proc.h"
-#include "kernel/debug.h"
 #include "direct_utils.h"
 #include <machine/multiboot.h>
 
index 25c536883f1f18ef2cda178ebd7d662e4f3c9029..09f42ff0430f47607203d2ee4e03e8720e728bc8 100644 (file)
@@ -7,9 +7,7 @@
 #define _SMP
 
 #include "kernel/kernel.h"
-#include "kernel/proc.h"
 #include "arch_proto.h"
-#include "kernel/glo.h"
 #include <unistd.h>
 #include <assert.h>
 #include <stdlib.h>
index 6dd62d2e9a6dc07abd9baaa0653441c6183b86d0..7cc9f41575d922375acdc74cf0e03ae45d387adb 100644 (file)
@@ -19,8 +19,6 @@
 #include "arch_proto.h"
 #include "serial.h"
 #include "oxpcie.h"
-#include "kernel/proc.h"
-#include "kernel/debug.h"
 #include "direct_utils.h"
 #include <machine/multiboot.h>
 
index 8611c81ce2c08c18e5717bebbfa96c2df1be0ce4..e10d6dd73f89be22ac4511cfcfba72fd87cfd0cc 100644 (file)
@@ -8,8 +8,6 @@
 #include <signal.h>
 #include <string.h>
 #include <assert.h>
-#include "kernel/proc.h"
-#include "kernel/proto.h"
 #include <machine/vm.h>
 
 struct ex_s {
index c019ab11d3cb2c0b9e5f7fe664d7c2b3b898cd7f..b73befcfb0458f114ddf74fe4000de692c6d93de 100644 (file)
@@ -10,8 +10,6 @@
 #include <machine/asm.h>
 #include <machine/interrupt.h>
 #include "archconst.h"
-#include "kernel/const.h"
-#include "kernel/proc.h"
 #include "sconst.h"
 #include <machine/multiboot.h>
 
index 65e0021bd4a8ce6003947fc63dc06793ab7ff7da..76cf10dac6a751a64a0fa098ef36cc47ca05a3d6 100644 (file)
@@ -6,7 +6,6 @@
  */
 
 #include "kernel/kernel.h"
-#include "kernel/proc.h"
 #include "arch_proto.h"
 #include "hw_intr.h"
 #include <minix/portio.h>
index 78bdb26a7936c12cb697ee84ae628fba5da38402..3e4b74347efbe7d44289b97f2633cf38cdd044a6 100644 (file)
@@ -1,6 +1,5 @@
 
 #include "kernel/kernel.h"
-#include "kernel/proc.h"
 #include "kernel/vm.h"
 
 #include <machine/vm.h>
@@ -17,8 +16,6 @@
 
 #include "oxpcie.h"
 #include "arch_proto.h"
-#include "kernel/proto.h"
-#include "kernel/debug.h"
 
 #ifdef USE_APIC
 #include "apic.h"
index a0264d03a4514e827b6b4e4bdf902056d3e6077a..d39772157ef8e292ea07e8f582ff91e23a498f30 100644 (file)
@@ -1,6 +1,5 @@
 
 include "kernel.h"
-include "proc.h"
 
 struct proc
 member DIREG p_reg.di
index 9fcfb4c26ec624870f0d9be72c7c62e1775e569b..cd3c6bbec112066dac937e3a2412e87741aab763 100644 (file)
@@ -8,7 +8,6 @@
 #include <machine/multiboot.h>
 
 #include "kernel/kernel.h"
-#include "kernel/proc.h"
 #include "archconst.h"
 
 #include "arch_proto.h"
index 1049d6b55564de43fa623de786a747e36941fcbe..7d478eec7203dc662c48d939ed82bbe3a604e60b 100644 (file)
@@ -30,7 +30,6 @@
  */
 
 #include "kernel.h"
-#include "proc.h"
 #include <minix/endpoint.h>
 #include <assert.h>
 
index 2f844f1b9043373df396e40ce2d6cb021e6b0d90..a13e58a61c7a7f9568562706ba072a93c179fa12 100644 (file)
@@ -4,9 +4,6 @@
 
 #ifndef __ASSEMBLY__
 
-#include "kernel.h"
-#include "proc.h"
-
 #ifdef CONFIG_SMP
 
 /* SMP */
index f0ac507b074cdb5e48ad3cfa49bdc8ad0cd95e45..260b334aa944051653987021b3054ba0ac1e691f 100644 (file)
@@ -4,8 +4,6 @@
  */
 
 #include "kernel.h"
-#include "proc.h"
-#include "debug.h"
 
 #include <minix/callnr.h>
 #include <minix/sysutil.h>
index 9293a4c0937a1d1a3574e66b7ee434695febd1d1..cdab6d1f1bee9e9dedc9fa39c536b3a80f3c7fc1 100644 (file)
@@ -16,7 +16,6 @@
 #include <assert.h>
 
 #include "kernel.h"
-#include "proc.h"
 #include "archconst.h"
 #include "hw_intr.h"
 
index 48aa3106c869d8b4d706b4e97cb7ac47049683af..77e5b0642193ea08e28cef02dc55e37d9249208d 100644 (file)
@@ -45,8 +45,9 @@
 #include "ipc.h"               /* IPC constants */
 #include "profile.h"           /* system profiling */
 #include "perf.h"              /* performance-related definitions */
+#include "proc.h"              /* process table */
+#include "cpulocals.h"         /* CPU-local variables */
 #include "debug.h"             /* debugging, MUST be last kernel header */
-#include "cpulocals.h"
 
 #ifndef CONFIG_SMP
 /* We only support 1 cpu now */
index c5e7ab29f85a43a6f68071f4b59de98ef9cef732..9dff7251cfa0ebf74f3d5c57b3fb145b71c478d4 100644 (file)
@@ -20,8 +20,6 @@
 #include <machine/vmparam.h>
 #include <minix/u64.h>
 #include <minix/type.h>
-#include "proc.h"
-#include "debug.h"
 #include "clock.h"
 #include "hw_intr.h"
 #include "arch_proto.h"
index e89c6ffa868baa64501667d40abc0dc74c4488d1..72a3d052c88b1d24821b510864261c2546931159 100644 (file)
 #include <signal.h>
 #include <assert.h>
 
-#include "debug.h"
 #include "kernel.h"
-#include "proc.h"
 #include "vm.h"
 #include "clock.h"
 #include "spinlock.h"
-#include "profile.h"
-
 #include "arch_proto.h"
 
 #include <minix/syslib.h>
index 55a2808cf2ae0cc6ad0cba803d485181ea42ad1a..c4547f51c9f7df1b61860edd7c732f3595baf5d7 100644 (file)
@@ -18,8 +18,6 @@
 #include <minix/config.h>
 
 #include "kernel.h"
-#include "profile.h"
-#include "proc.h"
 
 #include <minix/profile.h>
 #include <minix/portio.h>
index 8cd81c94bbf7597a7244d5538bd2a277e8ce31d9..e19d8f525fd04fd62743aaf1b071c54b016ad225 100644 (file)
  *   Sep 30, 2004   source code documentation updated  (Jorrit N. Herder)
  */
 
-#include "debug.h"
 #include "kernel.h"
 #include "system.h"
-#include "proc.h"
 #include "vm.h"
 #include "kernel/clock.h"
 #include <stdlib.h>
index 755ebae4e1acf3ee6be4a947128badb1f5437ccd..19285a176d2ff8438d52c2dba9ae2bb373d521e7 100644 (file)
 #ifndef SYSTEM_H
 #define SYSTEM_H
 
-/* Common includes for the system library. */
-#include "debug.h"
 #include "kernel.h"
-#include "proto.h"
-#include "proc.h"
 
 int do_exec(struct proc * caller, message *m_ptr);
 #if ! USE_EXEC
index 6a4a3f3d1f494d00932a2a46d771ab16584176a1..18cd1f48593afa9b7693ce724d014242c2157049 100644 (file)
@@ -30,8 +30,6 @@
 #define _TABLE
 
 #include "kernel.h"
-#include "proc.h"
-#include "ipc.h"
 #include <minix/com.h>
 
 /* The system image table lists all programs that are part of the boot image. 
index 1751573f511eec160fe6bad607d9a90b90d5b2ce..af2425e776bae2622fb89368c4412cf40e5d71f7 100644 (file)
@@ -4,7 +4,6 @@
  */
 
 #include "kernel.h"
-#include "proc.h"
 #include "arch_proto.h"
 
 #include <minix/syslib.h>