Browse Source

Merge branch 'sys_mman_update' into 'master'

sys/mman.h update addinng mlockall and posix_madvise flags

See merge request redox-os/relibc!357
Jeremy Soller 2 years ago
parent
commit
07329c9efe
1 changed files with 9 additions and 0 deletions
  1. 9 0
      src/header/sys_mman/mod.rs

+ 9 - 0
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)