4 #define F(t,n) {t *y = &x.n;}
5 #define C(n) switch(n){case n:;}
26 {void *x
= MAP_FAILED
;}
27 C(POSIX_MADV_DONTNEED
)
30 C(POSIX_MADV_SEQUENTIAL
)
31 C(POSIX_MADV_WILLNEED
)
33 #ifdef POSIX_TYPED_MEMORY_OBJECTS
34 C(POSIX_TYPED_MEM_ALLOCATE
)
35 C(POSIX_TYPED_MEM_ALLOCATE_CONTIG
)
36 C(POSIX_TYPED_MEM_MAP_ALLOCATABLE
)
38 struct posix_typed_mem_info x
;
39 F(size_t,posix_tmi_length
)
41 int(*p
)(const void*restrict
,size_t,off_t
*restrict
,size_t*restrict
,int*restrict
) = posix_mem_offset
;
42 int(*p
)(int,struct posix_typed_mem_info
*) = posix_typed_mem_get_info
;
43 int(*p
)(const char*,int,int) = posix_typed_mem_open
;
46 {int(*p
)(const void*,size_t) = mlock
;}
47 {int(*p
)(int) = mlockall
;}
48 {void*(*p
)(void*,size_t,int,int,int,off_t
) = mmap
;}
49 {int(*p
)(void*,size_t,int) = mprotect
;}
51 {int(*p
)(void*,size_t,int) = msync
;}
53 {int(*p
)(const void*,size_t) = munlock
;}
54 {int(*p
)(void) = munlockall
;}
55 {int(*p
)(void*,size_t) = munmap
;}
56 {int(*p
)(void*,size_t,int) = posix_madvise
;}
57 #ifdef POSIX_SHARED_MEMORY_OBJECTS
58 {int(*p
)(const char*,int,mode_t
) = shm_open
;}
59 {int(*p
)(const char*) = shm_unlink
;}