Skip to content

Commit 7e8f84c

Browse files
committed
Auto merge of #2979 - redox-os:redox-0.2.136, r=JohnTitor
Add MADV constants for Redox Required for `memmap2` crate
2 parents a8b7b9c + f9d1f3e commit 7e8f84c

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

libc-test/semver/redox.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,11 @@ IPV6_ADD_MEMBERSHIP
100100
IPV6_DROP_MEMBERSHIP
101101
IUCLC
102102
IUTF8
103+
MADV_DONTNEED
104+
MADV_NORMAL
105+
MADV_RANDOM
106+
MADV_SEQUENTIAL
107+
MADV_WILLNEED
103108
MSG_DONTWAIT
104109
NI_DGRAM
105110
NI_MAXSERV

src/unix/redox/mod.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -634,6 +634,12 @@ pub const PROT_READ: ::c_int = 0x0004;
634634
pub const PROT_WRITE: ::c_int = 0x0002;
635635
pub const PROT_EXEC: ::c_int = 0x0001;
636636

637+
pub const MADV_NORMAL: ::c_int = 0;
638+
pub const MADV_RANDOM: ::c_int = 1;
639+
pub const MADV_SEQUENTIAL: ::c_int = 2;
640+
pub const MADV_WILLNEED: ::c_int = 3;
641+
pub const MADV_DONTNEED: ::c_int = 4;
642+
637643
pub const MAP_SHARED: ::c_int = 0x0001;
638644
pub const MAP_PRIVATE: ::c_int = 0x0002;
639645
pub const MAP_ANON: ::c_int = 0x0020;

0 commit comments

Comments
 (0)