xref: /third_party/rust/crates/rustix/src/mm/mod.rs (revision b8a62b91)
1//! Memory map operations.
2
3#[cfg(not(target_os = "redox"))]
4mod madvise;
5mod mmap;
6mod msync;
7#[cfg(any(target_os = "android", target_os = "linux"))]
8mod userfaultfd;
9
10#[cfg(not(target_os = "redox"))]
11pub use madvise::{madvise, Advice};
12pub use mmap::{
13    mlock, mmap, mmap_anonymous, mprotect, munlock, munmap, MapFlags, MprotectFlags, ProtFlags,
14};
15#[cfg(any(target_os = "android", target_os = "linux"))]
16pub use mmap::{mlock_with, MlockFlags};
17#[cfg(any(linux_raw, all(libc, target_os = "linux")))]
18pub use mmap::{mremap, mremap_fixed, MremapFlags};
19pub use msync::{msync, MsyncFlags};
20#[cfg(any(target_os = "android", target_os = "linux"))]
21pub use userfaultfd::{userfaultfd, UserfaultfdFlags};
22