Use implicitly passed _caller_pid in syscalls

This commit is contained in:
2025-10-18 12:20:43 +02:00
parent a5fe64b253
commit 0e0bff4888
6 changed files with 34 additions and 34 deletions

View File

@ -31,7 +31,8 @@ int32_t SYSCALL5(sys_mman_map, addr1, size1, prot1, flags1, out1) {
hal_memset(VIRT(phys), 0, pages * HAL_PAGE_SIZE);
spinlock_acquire(&PROCS.spinlock);
Proc *proc = PROCS.current;
Proc *proc = NULL;
LL_FINDPROP(PROCS.procs, proc, pid, _caller_pid);
spinlock_release(&PROCS.spinlock);
uint8_t *virt = NULL;
@ -78,7 +79,8 @@ int32_t SYSCALL1(sys_mman_unmap, addr1) {
}
spinlock_acquire(&PROCS.spinlock);
Proc *proc = PROCS.current;
Proc *proc = NULL;
LL_FINDPROP(PROCS.procs, proc, pid, _caller_pid);
spinlock_release(&PROCS.spinlock);
VasRange *tofree = NULL;