base-hw: rename Core_thread Core_main_thread

The class name Core_thread in Kernel for the object of the first thread of
core is too generic as there can be an arbitrary number of threads in core
besides this one. Furthermore, creating a core thread has its own syscall
'new_core_thread' that isn't related in any way to Core_thread. Therefore
this commit introduces the more specific name Core_main_thread as replacement
for Core_thread.

Ref #4217
This commit is contained in:
Martin Stein 2021-07-12 16:15:20 +02:00 committed by Norman Feske
parent 693a2b5421
commit a9563bfd4c
4 changed files with 12 additions and 12 deletions

View File

@ -84,7 +84,7 @@ extern "C" void kernel_init()
Genode::log("");
Genode::log("kernel initialized");
Core_thread::singleton();
Core_main_thread::singleton();
kernel_ready = true;
} else {
/* secondary cpus spin until the kernel is initialized */

View File

@ -844,11 +844,11 @@ void Thread::print(Genode::Output &out) const
Genode::uint8_t __initial_stack_base[DEFAULT_STACK_SIZE];
/*****************
** Core_thread **
*****************/
/**********************
** Core_main_thread **
**********************/
Core_thread::Core_thread()
Core_main_thread::Core_main_thread()
:
Core_object<Thread>("core")
{
@ -877,8 +877,8 @@ Core_thread::Core_thread()
}
Thread & Core_thread::singleton()
Thread & Core_main_thread::singleton()
{
static Core_thread ct;
return ct;
static Core_main_thread cmt;
return cmt;
}

View File

@ -35,7 +35,7 @@
namespace Kernel {
struct Thread_fault;
class Thread;
class Core_thread;
class Core_main_thread;
}
@ -422,9 +422,9 @@ class Kernel::Thread : private Kernel::Object, public Cpu_job, private Timeout
/**
* The first core thread in the system bootstrapped by the Kernel
*/
struct Kernel::Core_thread : Core_object<Kernel::Thread>
struct Kernel::Core_main_thread : Core_object<Kernel::Thread>
{
Core_thread();
Core_main_thread();
static Thread & singleton();
};

View File

@ -93,7 +93,7 @@ void Thread::_init_platform_thread(size_t, Type type)
}
/* remap initial main-thread UTCB according to stack-area spec */
Genode::map_local(Platform::core_phys_addr((addr_t)Kernel::Core_thread::singleton().utcb()),
Genode::map_local(Platform::core_phys_addr((addr_t)Kernel::Core_main_thread::singleton().utcb()),
(addr_t)&_stack->utcb(),
max(sizeof(Native_utcb) / get_page_size(), (size_t)1));