1#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined XPG4
2constant PROT_READ
3constant PROT_WRITE
4constant PROT_EXEC
5constant PROT_NONE
6
7constant MAP_SHARED
8constant MAP_PRIVATE
9constant MAP_FIXED
10
11constant MS_ASYNC
12constant MS_SYNC
13constant MS_INVALIDATE
14
15constant MCL_CURRENT
16constant MCL_FUTURE
17
18constant MAP_FAILED
19
20# if !defined POSIX && !defined XPG4 && !defined XPG42 && !defined UNIX98
21constant POSIX_MADV_NORMAL
22constant POSIX_MADV_SEQUENTIAL
23constant POSIX_MADV_RANDOM
24constant POSIX_MADV_WILLNEED
25constant POSIX_MADV_DONTNEED
26
27optional-constant POSIX_TYPED_MEM_ALLOCATE
28optional-constant POSIX_TYPED_MEM_ALLOCATE_CONTIG
29optional-constant POSIX_TYPED_MEM_MAP_ALLOCATABLE
30
31type mode_t
32
33optional-type {struct posix_typedmem_info}
34optional-element {struct posix_typedmem_info} size_t posix_tmi_length
35
36function int posix_madvise (void*, size_t, int)
37optional-function int posix_mem_offset (const void*, size_t, off_t*, size_t*, int*)
38optional-function int posix_typed_mem_get_info (int, struct posix_typed_mem_info*)
39optional-function int posix_typed_mem_open (const char*, int, int)
40# endif
41
42# ifndef POSIX
43type size_t
44type off_t
45# endif
46
47function int mlock (const void*, size_t)
48function int mlockall (int)
49function {void*} mmap (void*, size_t, int, int, int, off_t)
50function int mprotect (void*, size_t, int)
51function int msync (void*, size_t, int)
52function int munlock (const void*, size_t)
53function int munlockall (void)
54function int munmap (void*, size_t)
55function int shm_open (const char*, int, mode_t)
56function int shm_unlink (const char*)
57
58allow shm_*
59allow MAP_*
60allow MCL_*
61allow MS_*
62allow PROT_*
63allow *_t
64#endif
65