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
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
5626083aad
commit
eeb69c923c
@ -62,7 +62,7 @@ void oom_thread()
|
|||||||
|
|
||||||
auto init =
|
auto init =
|
||||||
mark_critical(VFS::resolve_path("/bin/preinit", Credentials {}), "Can't find init in the initial ramfs!");
|
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");
|
"Failed to create PID 1 process for init");
|
||||||
|
|
||||||
auto reap = mark_critical(Scheduler::new_kernel_thread(reap_thread, "[reap]"),
|
auto reap = mark_critical(Scheduler::new_kernel_thread(reap_thread, "[reap]"),
|
||||||
|
@ -140,8 +140,10 @@ namespace Scheduler
|
|||||||
return new_kernel_thread_impl(thread, name);
|
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* const thread = TRY(make<Thread>());
|
||||||
|
|
||||||
thread->state = ThreadState::None;
|
thread->state = ThreadState::None;
|
||||||
|
@ -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), const char* name);
|
||||||
Result<Thread*> new_kernel_thread(void (*func)(void*), void* arg, 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);
|
void add_thread(Thread* thread);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user