|
nsz |
f81126 |
#include <sys/mman.h>
|
|
nsz |
f81126 |
#define T(t) (t*)0;
|
|
nsz |
f81126 |
#define F(t,n) {t *y = &x.;;}
|
|
nsz |
f81126 |
#define C(n) switch(n){case n:;}
|
|
nsz |
f81126 |
static void f()
|
|
nsz |
f81126 |
{
|
|
nsz |
f81126 |
T(mode_t)
|
|
nsz |
f81126 |
T(off_t)
|
|
nsz |
f81126 |
T(size_t)
|
|
nsz |
f81126 |
C(PROT_EXEC)
|
|
nsz |
f81126 |
C(PROT_NONE)
|
|
nsz |
f81126 |
C(PROT_READ)
|
|
nsz |
f81126 |
C(PROT_WRITE)
|
|
nsz |
f81126 |
C(MAP_FIXED)
|
|
nsz |
f81126 |
C(MAP_PRIVATE)
|
|
nsz |
f81126 |
C(MAP_SHARED)
|
|
nsz |
f81126 |
#ifdef _XOPEN_SOURCE
|
|
nsz |
f81126 |
C(MS_ASYNC)
|
|
nsz |
f81126 |
C(MS_INVALIDATE)
|
|
nsz |
f81126 |
C(MS_SYNC)
|
|
nsz |
f81126 |
#endif
|
|
nsz |
f81126 |
C(MCL_CURRENT)
|
|
nsz |
f81126 |
C(MCL_FUTURE)
|
|
nsz |
f81126 |
{void *x = MAP_FAILED;}
|
|
nsz |
f81126 |
C(POSIX_MADV_DONTNEED)
|
|
nsz |
f81126 |
C(POSIX_MADV_NORMAL)
|
|
nsz |
f81126 |
C(POSIX_MADV_RANDOM)
|
|
nsz |
f81126 |
C(POSIX_MADV_SEQUENTIAL)
|
|
nsz |
f81126 |
C(POSIX_MADV_WILLNEED)
|
|
nsz |
f81126 |
//C(POSIX_TYPED_MEM_ALLOCATE)
|
|
nsz |
f81126 |
//C(POSIX_TYPED_MEM_ALLOCATE_CONTIG)
|
|
nsz |
f81126 |
//C(POSIX_TYPED_MEM_MAP_ALLOCATABLE)
|
|
nsz |
f81126 |
//{
|
|
nsz |
f81126 |
//struct posix_typed_mem_info x;
|
|
nsz |
f81126 |
//F(size_t,posix_tmi_length)
|
|
nsz |
f81126 |
//}
|
|
nsz |
f81126 |
int(*p_mlock)(const void*,size_t) = mlock;
|
|
nsz |
f81126 |
int(*p_mlockall)(int) = mlockall;
|
|
nsz |
f81126 |
void*(*p_mmap)(void*,size_t,int,int,int,off_t) = mmap;
|
|
nsz |
f81126 |
int(*p_mprotect)(void*,size_t,int) = mprotect;
|
|
nsz |
f81126 |
#ifdef _XOPEN_SOURCE
|
|
nsz |
f81126 |
int(*p_msync)(void*,size_t,int) = msync;
|
|
nsz |
f81126 |
#endif
|
|
nsz |
f81126 |
int(*p_munlock)(const void*,size_t) = munlock;
|
|
nsz |
f81126 |
int(*p_munlockall)(void) = munlockall;
|
|
nsz |
f81126 |
int(*p_munmap)(void*,size_t) = munmap;
|
|
nsz |
f81126 |
int(*p_posix_madvise)(void*,size_t,int) = posix_madvise;
|
|
nsz |
f81126 |
//int(*p_posix_mem_offset)(const void*restrict,size_t,off_t*restrict,size_t*restrict,int*restrict) = posix_mem_offset;
|
|
nsz |
f81126 |
//int(*p_posix_typed_mem_get_info)(int,struct posix_typed_mem_info*) = posix_typed_mem_get_info;
|
|
nsz |
f81126 |
//int(*p_posix_typed_mem_open)(const char*,int,int) = posix_typed_mem_open;
|
|
nsz |
f81126 |
int(*p_shm_open)(const char*,int,mode_t) = shm_open;
|
|
nsz |
f81126 |
int(*p_shm_unlink)(const char*) = shm_unlink;
|
|
nsz |
f81126 |
}
|