Use implicitly passed _caller_pid in syscalls
This commit is contained in:
@ -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;
|
||||
|
||||
Reference in New Issue
Block a user