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
+5
View File
@@ -87,6 +87,11 @@ pub unsafe extern "C" fn munmap(addr: *mut c_void, len: size_t) -> c_int {
Sys::munmap(addr, len)
}
#[no_mangle]
pub unsafe extern "C" fn madvise(addr: *mut c_void, len: size_t, flags: c_int) -> c_int {
Sys::madvise(addr, len, flags)
}
#[cfg(target_os = "linux")]
static SHM_PATH: &'static [u8] = b"/dev/shm/";