mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-15 23:37:32 +03:00
Kernel/riscv64: Implement create_thread
This commit is contained in:
parent
65724efac3
commit
04ca9f393f
Notes:
sideshowbarker
2024-07-17 04:34:25 +09:00
Author: https://github.com/spholz Commit: https://github.com/SerenityOS/serenity/commit/04ca9f393f Pull-request: https://github.com/SerenityOS/serenity/pull/23514 Reviewed-by: https://github.com/ADKaster ✅
@ -77,7 +77,13 @@ ErrorOr<FlatPtr> Process::sys$create_thread(void* (*entry)(void*), Userspace<Sys
|
||||
regs.x[2] = (FlatPtr)params.stack_location;
|
||||
regs.x[3] = (FlatPtr)params.stack_size;
|
||||
#elif ARCH(RISCV64)
|
||||
TODO_RISCV64();
|
||||
regs.satp = address_space().with([](auto& space) { return space->page_directory().satp(); });
|
||||
|
||||
// Set up the argument registers expected by pthread_create_helper.
|
||||
regs.x[9] = (FlatPtr)params.entry;
|
||||
regs.x[10] = (FlatPtr)params.entry_argument;
|
||||
regs.x[11] = (FlatPtr)params.stack_location;
|
||||
regs.x[12] = (FlatPtr)params.stack_size;
|
||||
#else
|
||||
# error Unknown architecture
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user