Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add MADV constants for Redox #2979

Merged
merged 1 commit into from Oct 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions libc-test/semver/redox.txt
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
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;
JohnTitor marked this conversation as resolved.
Show resolved Hide resolved
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