File tree Expand file tree Collapse file tree 2 files changed +12
-7
lines changed
src/unix/bsd/netbsdlike/netbsd Expand file tree Collapse file tree 2 files changed +12
-7
lines changed Original file line number Diff line number Diff line change @@ -628,6 +628,7 @@ MADV_NORMAL
628628MADV_RANDOM
629629MADV_SEQUENTIAL
630630MADV_WILLNEED
631+ MAP_ALIGNED
631632MAP_ALIGNMENT_16MB
632633MAP_ALIGNMENT_1TB
633634MAP_ALIGNMENT_256TB
Original file line number Diff line number Diff line change @@ -1663,13 +1663,13 @@ pub const MAP_WIRED: ::c_int = 0x800;
16631663pub const MAP_STACK : :: c_int = 0x2000 ;
16641664// map alignment aliases for MAP_ALIGNED
16651665pub const MAP_ALIGNMENT_SHIFT : :: c_int = 24 ;
1666- pub const MAP_ALIGNMENT_MASK : :: c_int = 0xff << MAP_ALIGNMENT_SHIFT ;
1667- pub const MAP_ALIGNMENT_64KB : :: c_int = 16 << MAP_ALIGNMENT_SHIFT ;
1668- pub const MAP_ALIGNMENT_16MB : :: c_int = 24 << MAP_ALIGNMENT_SHIFT ;
1669- pub const MAP_ALIGNMENT_4GB : :: c_int = 32 << MAP_ALIGNMENT_SHIFT ;
1670- pub const MAP_ALIGNMENT_1TB : :: c_int = 40 << MAP_ALIGNMENT_SHIFT ;
1671- pub const MAP_ALIGNMENT_256TB : :: c_int = 48 << MAP_ALIGNMENT_SHIFT ;
1672- pub const MAP_ALIGNMENT_64PB : :: c_int = 56 << MAP_ALIGNMENT_SHIFT ;
1666+ pub const MAP_ALIGNMENT_MASK : :: c_int = MAP_ALIGNED ( 0xff ) ;
1667+ pub const MAP_ALIGNMENT_64KB : :: c_int = MAP_ALIGNED ( 16 ) ;
1668+ pub const MAP_ALIGNMENT_16MB : :: c_int = MAP_ALIGNED ( 24 ) ;
1669+ pub const MAP_ALIGNMENT_4GB : :: c_int = MAP_ALIGNED ( 32 ) ;
1670+ pub const MAP_ALIGNMENT_1TB : :: c_int = MAP_ALIGNED ( 40 ) ;
1671+ pub const MAP_ALIGNMENT_256TB : :: c_int = MAP_ALIGNED ( 48 ) ;
1672+ pub const MAP_ALIGNMENT_64PB : :: c_int = MAP_ALIGNED ( 56 ) ;
16731673// mremap flag
16741674pub const MAP_REMAPDUP : :: c_int = 0x004 ;
16751675
@@ -2467,6 +2467,10 @@ safe_f! {
24672467 dev |= minor & 0xff ;
24682468 dev
24692469 }
2470+
2471+ pub { const } fn MAP_ALIGNED ( alignment: :: c_int) -> :: c_int {
2472+ alignment << MAP_ALIGNMENT_SHIFT
2473+ }
24702474}
24712475
24722476extern "C" {
You can’t perform that action at this time.
0 commit comments