2011-02-12 05:22:29 +00:00
|
|
|
#ifndef _SYS_MMAN_H
|
|
|
|
#define _SYS_MMAN_H
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2012-09-08 03:13:55 +00:00
|
|
|
#include <features.h>
|
|
|
|
|
2011-02-12 05:22:29 +00:00
|
|
|
#define __NEED_mode_t
|
|
|
|
#define __NEED_size_t
|
|
|
|
#define __NEED_off_t
|
|
|
|
|
2012-09-17 02:26:23 +00:00
|
|
|
#if defined(_GNU_SOURCE)
|
|
|
|
#define __NEED_ssize_t
|
|
|
|
#endif
|
|
|
|
|
2011-02-12 05:22:29 +00:00
|
|
|
#include <bits/alltypes.h>
|
|
|
|
|
|
|
|
#include <bits/mman.h>
|
|
|
|
|
|
|
|
void *mmap (void *, size_t, int, int, int, off_t);
|
|
|
|
int munmap (void *, size_t);
|
|
|
|
|
|
|
|
int mprotect (void *, size_t, int);
|
|
|
|
int msync (void *, size_t, int);
|
|
|
|
|
|
|
|
int posix_madvise (void *, size_t, int);
|
|
|
|
|
|
|
|
int mlock (const void *, size_t);
|
|
|
|
int munlock (const void *, size_t);
|
|
|
|
int mlockall (int);
|
|
|
|
int munlockall (void);
|
|
|
|
|
2011-03-03 05:32:15 +00:00
|
|
|
#ifdef _GNU_SOURCE
|
2011-02-12 05:22:29 +00:00
|
|
|
void *mremap (void *, size_t, size_t, int, ...);
|
2012-09-17 02:26:23 +00:00
|
|
|
int remap_file_pages (void *, size_t, int, ssize_t, int);
|
2012-05-23 01:52:08 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
|
2011-03-03 05:32:15 +00:00
|
|
|
int madvise (void *, size_t, int);
|
2012-09-09 20:37:19 +00:00
|
|
|
int mincore (void *, size_t, unsigned char *);
|
2011-03-03 05:32:15 +00:00
|
|
|
#endif
|
2011-02-12 05:22:29 +00:00
|
|
|
|
|
|
|
int shm_open (const char *, int, mode_t);
|
|
|
|
int shm_unlink (const char *);
|
|
|
|
|
2012-06-04 12:03:56 +00:00
|
|
|
#if defined(_LARGEFILE64_SOURCE) || defined(_GNU_SOURCE)
|
2012-05-04 04:31:25 +00:00
|
|
|
#define mmap64 mmap
|
|
|
|
#define off64_t off_t
|
|
|
|
#endif
|
|
|
|
|
2011-02-12 05:22:29 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
#endif
|