mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-07 20:31:04 +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[2] = (FlatPtr)params.stack_location;
|
||||||
regs.x[3] = (FlatPtr)params.stack_size;
|
regs.x[3] = (FlatPtr)params.stack_size;
|
||||||
#elif ARCH(RISCV64)
|
#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
|
#else
|
||||||
# error Unknown architecture
|
# error Unknown architecture
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user