mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-04-05 04:06:08 +00:00
Kernel: Factor out setting Thread entry function
This adds ThreadRegisters::set_entry_function, and also implements it for aarch64.
This commit is contained in:
committed by
Andrew Kaster
parent
a6f78b895f
commit
1da84c2a2c
@@ -273,15 +273,7 @@ LockRefPtr<Process> Process::create_kernel_process(LockRefPtr<Thread>& first_thr
|
||||
return {};
|
||||
auto process = process_or_error.release_value();
|
||||
|
||||
first_thread->regs().set_ip((FlatPtr)entry);
|
||||
#if ARCH(X86_64)
|
||||
first_thread->regs().rdi = FlatPtr(entry_data); // entry function argument is expected to be in regs.rdi
|
||||
#elif ARCH(AARCH64)
|
||||
(void)entry_data;
|
||||
TODO_AARCH64();
|
||||
#else
|
||||
# error Unknown architecture
|
||||
#endif
|
||||
first_thread->regs().set_entry_function((FlatPtr)entry, (FlatPtr)entry_data);
|
||||
|
||||
if (do_register == RegisterProcess::Yes)
|
||||
register_new(*process);
|
||||
|
||||
Reference in New Issue
Block a user