mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 17:17:45 +00:00
Kernel+LibC: Implement pthread_create
for AArch64
Instead of storing x86_64 register names in `SC_create_thread_params`, let the Kernel figure out how to pass the parameters to `pthread_create_helper`.
This commit is contained in:
parent
9b9cc76b1d
commit
d205814da6
3 changed files with 20 additions and 22 deletions
|
@ -90,18 +90,9 @@ static int create_thread(pthread_t* thread, void* (*entry)(void*), void* argumen
|
|||
while (((uintptr_t)stack - 16) % 16 != 0)
|
||||
push_on_stack(nullptr);
|
||||
|
||||
#if ARCH(X86_64)
|
||||
thread_params->rdi = (FlatPtr)entry;
|
||||
thread_params->rsi = (FlatPtr)argument;
|
||||
thread_params->rdx = (FlatPtr)thread_params->stack_location;
|
||||
thread_params->rcx = thread_params->stack_size;
|
||||
#elif ARCH(AARCH64)
|
||||
(void)entry;
|
||||
(void)argument;
|
||||
TODO_AARCH64();
|
||||
#else
|
||||
# error Unknown architecture
|
||||
#endif
|
||||
thread_params->entry = entry;
|
||||
thread_params->entry_argument = argument;
|
||||
|
||||
VERIFY((uintptr_t)stack % 16 == 0);
|
||||
|
||||
// Push a fake return address
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue