mman.h 912 字节
Newer Older
R
Rich Felker 已提交
1 2 3 4 5 6
#ifndef	_SYS_MMAN_H
#define	_SYS_MMAN_H
#ifdef __cplusplus
extern "C" {
#endif

7 8
#include <features.h>

R
Rich Felker 已提交
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
#define __NEED_mode_t
#define __NEED_size_t
#define __NEED_off_t

#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);

R
Rich Felker 已提交
30
#ifdef _GNU_SOURCE
R
Rich Felker 已提交
31
void *mremap (void *, size_t, size_t, int, ...);
32 33 34
#endif

#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
R
Rich Felker 已提交
35 36
int madvise (void *, size_t, int);
#endif
R
Rich Felker 已提交
37 38 39 40

int shm_open (const char *, int, mode_t);
int shm_unlink (const char *);

41
#if defined(_LARGEFILE64_SOURCE) || defined(_GNU_SOURCE)
R
Rich Felker 已提交
42 43 44 45
#define mmap64 mmap
#define off64_t off_t
#endif

R
Rich Felker 已提交
46 47 48 49
#ifdef __cplusplus
}
#endif
#endif