Skip to content

Commit

Permalink
mman MapFlags update for FreeBSD/NetBSD regarding page alignment
Browse files Browse the repository at this point in the history
  • Loading branch information
devnexen committed Aug 7, 2023
1 parent ee91423 commit 346c22f
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions src/sys/mman.rs
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,38 @@ libc_bitflags! {
#[cfg(target_os = "openbsd")]
#[cfg_attr(docsrs, doc(cfg(all())))]
MAP_CONCEAL;
/// Pages aligned on 64kb
#[cfg(target_os = "netbsd")]
#[cfg_attr(docsrs, doc(cfg(all())))]
MAP_ALIGNMENT_64KB;
/// Pages aligned on 16mb
#[cfg(target_os = "netbsd")]
#[cfg_attr(docsrs, doc(cfg(all())))]
MAP_ALIGNMENT_16MB;
/// Pages aligned on 4gb
#[cfg(target_os = "netbsd")]
#[cfg_attr(docsrs, doc(cfg(all())))]
MAP_ALIGNMENT_4GB;
/// Pages aligned on 1tb
#[cfg(target_os = "netbsd")]
#[cfg_attr(docsrs, doc(cfg(all())))]
MAP_ALIGNMENT_1TB;
/// Pages aligned on 256tb
#[cfg(target_os = "netbsd")]
#[cfg_attr(docsrs, doc(cfg(all())))]
MAP_ALIGNMENT_256TB;
/// Pages aligned on 64pb
#[cfg(target_os = "netbsd")]
#[cfg_attr(docsrs, doc(cfg(all())))]
MAP_ALIGNMENT_64PB;
/// Right operand value for the page alignment bitshift calculation
#[cfg(any(target_os = "netbsd", target_os = "freebsd"))]
#[cfg_attr(docsrs, doc(cfg(all())))]
MAP_ALIGNMENT_SHIFT;
/// Mask to get the page alignment (as `(flags & align mask) >> align shift`)
#[cfg(any(target_os = "netbsd", target_os = "freebsd"))]
#[cfg_attr(docsrs, doc(cfg(all())))]
MAP_ALIGNMENT_MASK;
}
}

Expand Down

0 comments on commit 346c22f

Please sign in to comment.