From 2b5d8c67facaacaf6ee11b8131df09fc11c513cb Mon Sep 17 00:00:00 2001 From: AlmuHS Date: Thu, 27 Jun 2019 19:40:29 +0200 Subject: fix: recovered cpu_number() call to get current cpu --- kern/startup.c | 10 +++++----- kern/startup.h | 2 +- 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 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 -- cgit v1.2.3