summaryrefslogtreecommitdiff
path: root/kern
diff options
context:
space:
mode:
Diffstat (limited to 'kern')
-rw-r--r--kern/bootstrap.h24
-rw-r--r--kern/sched_prim.h3
-rw-r--r--kern/startup.c26
-rw-r--r--kern/startup.h4
4 files changed, 38 insertions, 19 deletions
diff --git a/kern/bootstrap.h b/kern/bootstrap.h
new file mode 100644
index 0000000..b8ed8d9
--- /dev/null
+++ b/kern/bootstrap.h
@@ -0,0 +1,24 @@
+/*
+ * Copyright (c) 2013 Free Software Foundation.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+#ifndef _KERN_BOOTSTRAP_H_
+#define _KERN_BOOTSTRAP_H_
+
+extern void bootstrap_create(void);
+
+#endif /* _KERN_BOOTSTRAP_H_ */
diff --git a/kern/sched_prim.h b/kern/sched_prim.h
index b7ecba7..07b5bf0 100644
--- a/kern/sched_prim.h
+++ b/kern/sched_prim.h
@@ -181,4 +181,7 @@ void checkrq(run_queue_t rq, char *msg);
void thread_check(thread_t th, run_queue_t rq);
#endif /* DEBUG */
+extern void idle_thread(void);
+extern void sched_thread(void);
+
#endif /* _KERN_SCHED_PRIM_H_ */
diff --git a/kern/startup.c b/kern/startup.c
index 22e9997..be83f6b 100644
--- a/kern/startup.c
+++ b/kern/startup.c
@@ -47,45 +47,33 @@
#include <kern/thread_swap.h>
#include <kern/timer.h>
#include <kern/xpr.h>
+#include <kern/bootstrap.h>
#include <kern/time_stamp.h>
+#include <kern/startup.h>
#include <vm/vm_kern.h>
#include <vm/vm_map.h>
#include <vm/vm_object.h>
#include <vm/vm_page.h>
+#include <vm/vm_init.h>
+#include <vm/vm_pageout.h>
#include <machine/machspl.h>
#include <machine/pcb.h>
#include <machine/pmap.h>
#include <machine/model_dep.h>
#include <mach/version.h>
+#include <device/device_init.h>
#if MACH_KDB
#include <device/cons.h>
#endif /* MACH_KDB */
-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_KBD
boolean_t reboot_on_panic = 1;
#endif
#if NCPUS > 1
-extern void start_other_cpus();
-extern void action_thread();
+#include <machine/mp_desc.h>
+#include <kern/machine.h>
#endif /* NCPUS > 1 */
/* XX */
diff --git a/kern/startup.h b/kern/startup.h
index d167fde..d924d15 100644
--- a/kern/startup.h
+++ b/kern/startup.h
@@ -19,6 +19,10 @@
#ifndef _KERN_STARTUP_H_
#define _KERN_STARTUP_H_
+#include <kern/thread.h>
+
extern void setup_main(void);
+void cpu_launch_first_thread(thread_t th);
+void start_kernel_threads(void);
#endif /* _KERN_STARTUP_H_ */