--- Gnu-Mach/kern/startup.c 2020/09/02 04:45:14 1.1.1.4 +++ Gnu-Mach/kern/startup.c 2020/09/02 04:49:52 1.1.1.6 @@ -39,51 +39,41 @@ #include #include #include -#include #include +#include #include #include #include #include #include #include +#include #include +#include #include #include #include #include +#include +#include #include #include #include #include #include +#include - - -extern void vm_mem_init(); -extern void vm_mem_bootstrap(); -extern void init_timeout(); -extern void machine_init(); - -extern void idle_thread(); -extern void vm_pageout(); -extern void reaper_thread(); -extern void swapin_thread(); -extern void sched_thread(); - -extern void bootstrap_create(); -extern void device_service_create(); - -void cpu_launch_first_thread(); /* forward */ -void start_kernel_threads(); /* forward */ +#if MACH_KDB +#include +#endif /* MACH_KDB */ #if ! MACH_KBD -boolean_t reboot_on_panic = 1; +boolean_t reboot_on_panic = TRUE; #endif #if NCPUS > 1 -extern void start_other_cpus(); -extern void action_thread(); +#include +#include #endif /* NCPUS > 1 */ /* XX */ @@ -96,7 +86,7 @@ extern char *kernel_cmdline; * * Assumes that master_cpu is set. */ -void setup_main() +void setup_main(void) { thread_t startup_thread; @@ -113,15 +103,15 @@ void setup_main() } #else /* MACH_KDB */ if (strstr (kernel_cmdline, "-H ")) { - reboot_on_panic = 0; + reboot_on_panic = FALSE; } #endif /* MACH_KDB */ panic_init(); - printf_init(); sched_init(); vm_mem_bootstrap(); + rdxtree_cache_init(); ipc_bootstrap(); vm_mem_init(); ipc_init(); @@ -165,7 +155,7 @@ void setup_main() * Kick off the time-out driven routines by calling * them the first time. */ - recompute_priorities(); + recompute_priorities(NULL); compute_mach_factor(); /* @@ -208,9 +198,9 @@ void setup_main() * Now running in a thread. Create the rest of the kernel threads * and the bootstrap task. */ -void start_kernel_threads() +void start_kernel_threads(void) { - register int i; + int i; /* * Create the idle threads and the other @@ -276,7 +266,7 @@ void start_kernel_threads() } #if NCPUS > 1 -void slave_main() +void slave_main(void) { cpu_launch_first_thread(THREAD_NULL); } @@ -286,10 +276,9 @@ void slave_main() * Start up the first thread on a CPU. * First thread is specified for the master CPU. */ -void cpu_launch_first_thread(th) - register thread_t th; +void cpu_launch_first_thread(thread_t th) { - register int mycpu; + int mycpu; mycpu = cpu_number();