Skip to content

Commit

Permalink
Auto merge of #2979 - redox-os:redox-0.2.136, r=JohnTitor
Browse files Browse the repository at this point in the history
Add MADV constants for Redox

Required for `memmap2` crate
  • Loading branch information
bors committed Oct 25, 2022
2 parents a8b7b9c + f9d1f3e commit 7e8f84c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
5 changes: 5 additions & 0 deletions libc-test/semver/redox.txt
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,11 @@ IPV6_ADD_MEMBERSHIP
IPV6_DROP_MEMBERSHIP
IUCLC
IUTF8
MADV_DONTNEED
MADV_NORMAL
MADV_RANDOM
MADV_SEQUENTIAL
MADV_WILLNEED
MSG_DONTWAIT
NI_DGRAM
NI_MAXSERV
Expand Down
6 changes: 6 additions & 0 deletions src/unix/redox/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -634,6 +634,12 @@ pub const PROT_READ: ::c_int = 0x0004;
pub const PROT_WRITE: ::c_int = 0x0002;
pub const PROT_EXEC: ::c_int = 0x0001;

pub const MADV_NORMAL: ::c_int = 0;
pub const MADV_RANDOM: ::c_int = 1;
pub const MADV_SEQUENTIAL: ::c_int = 2;
pub const MADV_WILLNEED: ::c_int = 3;
pub const MADV_DONTNEED: ::c_int = 4;

pub const MAP_SHARED: ::c_int = 0x0001;
pub const MAP_PRIVATE: ::c_int = 0x0002;
pub const MAP_ANON: ::c_int = 0x0020;
Expand Down

0 comments on commit 7e8f84c

Please sign in to comment.