Skip to content

Commit

Permalink
Add mlock, munlock, mlockall, and munlockall. Corresponds to llvm-pro…
Browse files Browse the repository at this point in the history
…ject-deluge/a3600d804e03
  • Loading branch information
Filip Pizlo committed Jul 3, 2024
1 parent 12513a5 commit 36315e1
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 9 deletions.
6 changes: 1 addition & 5 deletions src/mman/mlock.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,5 @@

int mlock(const void *addr, size_t len)
{
#ifdef SYS_mlock
return syscall(SYS_mlock, addr, len);
#else
return syscall(SYS_mlock2, addr, len, 0);
#endif
return zsys_mlock(addr, len);
}
2 changes: 1 addition & 1 deletion src/mman/mlockall.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@

int mlockall(int flags)
{
return syscall(SYS_mlockall, flags);
return zsys_mlockall(flags);
}
2 changes: 1 addition & 1 deletion src/mman/munlock.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@

int munlock(const void *addr, size_t len)
{
return syscall(SYS_munlock, addr, len);
return zsys_munlock(addr, len);
}
2 changes: 1 addition & 1 deletion src/mman/munlockall.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@

int munlockall(void)
{
return syscall(SYS_munlockall);
return zsys_munlockall();
}
2 changes: 1 addition & 1 deletion src/unistd/getsid.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@

pid_t getsid(pid_t pid)
{
return syscall(SYS_getsid, pid);
return zsys_getsid(pid);
}

0 comments on commit 36315e1

Please sign in to comment.