summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlmuHS <almuhs@github.com>2019-06-27 19:40:29 +0200
committerAlmuHS <almuhs@github.com>2019-06-27 19:40:29 +0200
commit2b5d8c67facaacaf6ee11b8131df09fc11c513cb (patch)
treee6165cde5f9b9087b01e2380c2e3adbf05e24063
parent320f1c56a27d53edbf924a723cea0c0755848ac0 (diff)
fix: recovered cpu_number() call to get current cpu
-rw-r--r--kern/startup.c10
-rw-r--r--kern/startup.h2
2 files changed, 6 insertions, 6 deletions
diff --git a/kern/startup.c b/kern/startup.c
index 941f51ea..51e7a704 100644
--- a/kern/startup.c
+++ b/kern/startup.c
@@ -203,7 +203,7 @@ void setup_main(void)
/*
* Start the thread.
*/
- cpu_launch_first_thread(startup_thread, 0);
+ cpu_launch_first_thread(startup_thread);
/*NOTREACHED*/
}
@@ -283,7 +283,7 @@ void start_kernel_threads(void)
#if NCPUS > 1
void slave_main(int mycpu)
{
- cpu_launch_first_thread(THREAD_NULL, mycpu);
+ cpu_launch_first_thread(THREAD_NULL);
}
#endif /* NCPUS > 1 */
@@ -291,11 +291,11 @@ void slave_main(int mycpu)
* Start up the first thread on a CPU.
* First thread is specified for the master CPU.
*/
-void cpu_launch_first_thread(thread_t th, int mycpu)
+void cpu_launch_first_thread(thread_t th)
{
- //int mycpu;
+ int mycpu;
- //mycpu = cpu_number();
+ mycpu = cpu_number();
cpu_up(mycpu);
diff --git a/kern/startup.h b/kern/startup.h
index e60f7075..72aa994c 100644
--- a/kern/startup.h
+++ b/kern/startup.h
@@ -22,7 +22,7 @@
#include <kern/thread.h>
extern void setup_main(void);
-void cpu_launch_first_thread(thread_t th, int mycpu);
+void cpu_launch_first_thread(thread_t th);
void start_kernel_threads(void);
#if NCPUS > 1