From 53cdd95267a99694f3f5d722cd735f0203ed2aa4 Mon Sep 17 00:00:00 2001 From: David Carlier Date: Tue, 28 Mar 2023 18:26:26 +0100 Subject: [PATCH] sys/mman.h update addinng mlockall and posix_madvise flags --- src/header/sys_mman/mod.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/header/sys_mman/mod.rs b/src/header/sys_mman/mod.rs index e3fe954997..7cca178448 100644 --- a/src/header/sys_mman/mod.rs +++ b/src/header/sys_mman/mod.rs @@ -30,6 +30,15 @@ pub const MS_ASYNC: c_int = 0x0001; pub const MS_INVALIDATE: c_int = 0x0002; pub const MS_SYNC: c_int = 0x0004; +pub const MCL_CURRENT: c_int = 1; +pub const MCL_FUTURE: c_int = 2; + +pub const POSIX_MADV_NORMAL: c_int = 0; +pub const POSIX_MADV_RANDOM: c_int = 1; +pub const POSIX_MADV_SEQUENTIAL: c_int = 2; +pub const POSIX_MADV_WILLNEED: c_int = 3; +pub const POSIX_MADV_WONTNEED: c_int = 4; + #[no_mangle] pub unsafe extern "C" fn mlock(addr: *const c_void, len: usize) -> c_int { Sys::mlock(addr, len)