sys_mman: adding madvise.

This commit is contained in:
David Carlier
2023-04-15 10:40:52 +01:00
parent d5c88c7ca6
commit 116583cdc7
5 changed files with 20 additions and 2 deletions
+4
View File
@@ -355,6 +355,10 @@ impl Pal for Sys {
e(syscall!(MUNMAP, addr, len)) as c_int
}
unsafe fn madvise(addr: *mut c_void, len: usize, flags: c_int) -> c_int {
e(syscall!(MADVISE, addr, len, flags)) as c_int
}
fn nanosleep(rqtp: *const timespec, rmtp: *mut timespec) -> c_int {
e(unsafe { syscall!(NANOSLEEP, rqtp, rmtp) }) as c_int
}