File tree Expand file tree Collapse file tree 1 file changed +35
-0
lines changed Expand file tree Collapse file tree 1 file changed +35
-0
lines changed Original file line number Diff line number Diff line change @@ -587,6 +587,23 @@ pub const TIOCSPGRP: ::c_ulong = 0x5410;
587587pub const TIOCGWINSZ : :: c_ulong = 0x5413 ;
588588pub const TIOCSWINSZ : :: c_ulong = 0x5414 ;
589589
590+ // sys/mman.h
591+ pub const PROT_NONE : :: c_int = 0x0000 ;
592+ pub const PROT_READ : :: c_int = 0x0004 ;
593+ pub const PROT_WRITE : :: c_int = 0x0002 ;
594+ pub const PROT_EXEC : :: c_int = 0x0001 ;
595+
596+ pub const MAP_SHARED : :: c_int = 0x0001 ;
597+ pub const MAP_PRIVATE : :: c_int = 0x0002 ;
598+ pub const MAP_ANON : :: c_int = 0x0020 ;
599+ pub const MAP_ANONYMOUS : :: c_int = MAP_ANON ;
600+ pub const MAP_FIXED : :: c_int = 0x0010 ;
601+ pub const MAP_FAILED : * mut :: c_void = !0 as _ ;
602+
603+ pub const MS_ASYNC : :: c_int = 0x0001 ;
604+ pub const MS_INVALIDATE : :: c_int = 0x0002 ;
605+ pub const MS_SYNC : :: c_int = 0x0004 ;
606+
590607// sys/select.h
591608pub const FD_SETSIZE : usize = 1024 ;
592609
@@ -934,6 +951,24 @@ extern "C" {
934951 // sys/ioctl.h
935952 pub fn ioctl ( fd : :: c_int , request : :: c_ulong , ...) -> :: c_int ;
936953
954+ // sys/mman.h
955+ pub fn msync (
956+ addr : * mut :: c_void ,
957+ len : :: size_t ,
958+ flags : :: c_int ,
959+ ) -> :: c_int ;
960+ pub fn mprotect (
961+ addr : * mut :: c_void ,
962+ len : :: size_t ,
963+ prot : :: c_int ,
964+ ) -> :: c_int ;
965+ pub fn shm_open (
966+ name : * const c_char ,
967+ oflag : :: c_int ,
968+ mode : mode_t ,
969+ ) -> :: c_int ;
970+ pub fn shm_unlink ( name : * const :: c_char ) -> :: c_int ;
971+
937972 // sys/resource.h
938973 pub fn getrlimit ( resource : :: c_int , rlim : * mut :: rlimit ) -> :: c_int ;
939974 pub fn setrlimit ( resource : :: c_int , rlim : * const :: rlimit ) -> :: c_int ;
You can’t perform that action at this time.
0 commit comments