kernel: Rename Scheduler::new_userspace_thread to clarify that it's only meant for init
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
apio 2023-09-25 19:34:02 +02:00
parent 5626083aad
commit eeb69c923c
Signed by: apio
GPG Key ID: B8A7D06E42258954
3 changed files with 5 additions and 3 deletions

View File

@ -62,7 +62,7 @@ void oom_thread()
auto init =
mark_critical(VFS::resolve_path("/bin/preinit", Credentials {}), "Can't find init in the initial ramfs!");
auto init_thread = mark_critical(Scheduler::new_userspace_thread(init, "/bin/preinit"),
auto init_thread = mark_critical(Scheduler::create_init_process(init, "/bin/preinit"),
"Failed to create PID 1 process for init");
auto reap = mark_critical(Scheduler::new_kernel_thread(reap_thread, "[reap]"),

View File

@ -140,8 +140,10 @@ namespace Scheduler
return new_kernel_thread_impl(thread, name);
}
Result<Thread*> new_userspace_thread(SharedPtr<VFS::Inode> inode, const char* name)
Result<Thread*> create_init_process(SharedPtr<VFS::Inode> inode, const char* name)
{
check(!g_init);
Thread* const thread = TRY(make<Thread>());
thread->state = ThreadState::None;

View File

@ -20,7 +20,7 @@ namespace Scheduler
Result<Thread*> new_kernel_thread(void (*func)(void), const char* name);
Result<Thread*> new_kernel_thread(void (*func)(void*), void* arg, const char* name);
Result<Thread*> new_userspace_thread(SharedPtr<VFS::Inode> inode, const char* name);
Result<Thread*> create_init_process(SharedPtr<VFS::Inode> inode, const char* name);
void add_thread(Thread* thread);