Implement argument_ptr () syscall for handling process arguments
All checks were successful
Build documentation / build-and-deploy (push) Successful in 37s

This commit is contained in:
2026-01-30 14:05:47 +01:00
parent 124aa12f5b
commit 38e26a9c12
10 changed files with 33 additions and 28 deletions

View File

@@ -58,7 +58,8 @@ struct proc* proc_from_elf (uint8_t* elf_contents) {
return proc;
}
struct proc* proc_clone (struct proc* proto, uintptr_t vstack_top, uintptr_t entry) {
struct proc* proc_clone (struct proc* proto, uintptr_t vstack_top, uintptr_t entry,
uintptr_t argument_ptr) {
struct limine_hhdm_response* hhdm = limine_hhdm_request.response;
spin_lock_ctx_t ctxprt;
@@ -88,6 +89,8 @@ struct proc* proc_clone (struct proc* proto, uintptr_t vstack_top, uintptr_t ent
proc->pdata.regs.cs = GDT_UCODE | 0x03;
proc->pdata.regs.rip = (uint64_t)entry;
proc->uvaddr_argument = argument_ptr;
proc_init_tls (proc);
return proc;