Skip to content

Commit

Permalink
syscalls: change return type of singalHandle and munmap to int
Browse files Browse the repository at this point in the history
JIRA: RTOS-667
  • Loading branch information
badochov committed Nov 2, 2023
1 parent 39b0e4e commit a413519
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions syscalls.c
Original file line number Diff line number Diff line change
Expand Up @@ -91,15 +91,20 @@ void *syscalls_mmap(void *ustack)
}


void syscalls_munmap(void *ustack)
int syscalls_munmap(void *ustack)
{
void *vaddr;
size_t size;
int err;

GETFROMSTACK(ustack, void *, vaddr, 0);
GETFROMSTACK(ustack, size_t, size, 1);

vm_munmap(proc_current()->process->mapp, vaddr, size);
err = vm_munmap(proc_current()->process->mapp, vaddr, size);
if (err < 0) {
return err;
}
return 0;
}


Expand Down Expand Up @@ -818,7 +823,7 @@ addr_t syscalls_va2pa(void *ustack)
}


void syscalls_signalHandle(void *ustack)
int syscalls_signalHandle(void *ustack)
{
void *handler;
unsigned mask, mmask;
Expand All @@ -831,6 +836,8 @@ void syscalls_signalHandle(void *ustack)
thread = proc_current();
thread->process->sigmask = (mask & mmask) | (thread->process->sigmask & ~mmask);
thread->process->sighandler = handler;

return EOK;
}


Expand Down

0 comments on commit a413519

Please sign in to comment.