summaryrefslogtreecommitdiff
path: root/kern
diff options
context:
space:
mode:
authorAlmuHS <almuhs@github.com>2019-04-22 19:15:10 +0200
committerAlmuHS <almuhs@github.com>2019-04-22 19:15:10 +0200
commitfc73f4fecf15930daa8f0cd06540cae173e73860 (patch)
tree07f599b59f910f2a5dea0d89a9c235b83fcb8eb1 /kern
parentc1d0a7464bbeced7250a0e2e55aa397f27a3c18e (diff)
added call to slave_main() in cpu_setup()
Diffstat (limited to 'kern')
-rw-r--r--kern/startup.c12
-rw-r--r--kern/startup.h6
2 files changed, 11 insertions, 7 deletions
diff --git a/kern/startup.c b/kern/startup.c
index 7a6bb279..f875c6b4 100644
--- a/kern/startup.c
+++ b/kern/startup.c
@@ -182,7 +182,7 @@ void setup_main(void)
*/
(void) thread_create(kernel_task, &startup_thread);
thread_start(startup_thread, start_kernel_threads);
- //pset_sys_bootstrap();
+ //pset_sys_bootstrap();
/*
* Give it a kernel stack.
@@ -203,7 +203,7 @@ void setup_main(void)
/*
* Start the thread.
*/
- cpu_launch_first_thread(startup_thread);
+ cpu_launch_first_thread(startup_thread, 0);
/*NOTREACHED*/
}
@@ -280,9 +280,9 @@ void start_kernel_threads(void)
}
#if NCPUS > 1
-void slave_main(void)
+void slave_main(int mycpu)
{
- cpu_launch_first_thread(THREAD_NULL);
+ cpu_launch_first_thread(THREAD_NULL, mycpu);
}
#endif /* NCPUS > 1 */
@@ -290,9 +290,9 @@ void slave_main(void)
* Start up the first thread on a CPU.
* First thread is specified for the master CPU.
*/
-void cpu_launch_first_thread(thread_t th)
+void cpu_launch_first_thread(thread_t th, int mycpu)
{
- int mycpu;
+ //int mycpu;
mycpu = cpu_number();
diff --git a/kern/startup.h b/kern/startup.h
index d924d154..e60f7075 100644
--- a/kern/startup.h
+++ b/kern/startup.h
@@ -22,7 +22,11 @@
#include <kern/thread.h>
extern void setup_main(void);
-void cpu_launch_first_thread(thread_t th);
+void cpu_launch_first_thread(thread_t th, int mycpu);
void start_kernel_threads(void);
+#if NCPUS > 1
+void slave_main(int mycpu);
+#endif
+
#endif /* _KERN_STARTUP_H_ */