PEBL 2.2
Psychology Experiment Building Language - Cross-platform psychological experiment development system
mman.h
Go to the documentation of this file.
1 /*
2 * sys/mman.h
3 * mman-win32
4 Licensed with MIT license
5 http://code.google.com/p/mman-win32/source/browse/#svn%2Ftrunk
6 */
7
8#ifndef _SYS_MMAN_H_
9#define _SYS_MMAN_H_
10
11#ifndef _WIN32_WINNT // Allow use of features specific to Windows XP or later.
12#define _WIN32_WINNT 0x0501 // Change this to the appropriate value to target other versions of Windows.
13#endif
14
15/* All the headers include this file. */
16#ifndef _MSC_VER
17#include <_mingw.h>
18#endif
19
20#include <sys/types.h>
21
22#ifdef __cplusplus
23extern "C" {
24#endif
25
26#define PROT_NONE 0
27#define PROT_READ 1
28#define PROT_WRITE 2
29#define PROT_EXEC 4
30
31#define MAP_FILE 0
32#define MAP_SHARED 1
33#define MAP_PRIVATE 2
34#define MAP_TYPE 0xf
35#define MAP_FIXED 0x10
36#define MAP_ANONYMOUS 0x20
37#define MAP_ANON MAP_ANONYMOUS
38
39#define MAP_FAILED ((void *)-1)
40
41/* Flags for msync. */
42#define MS_ASYNC 1
43#define MS_SYNC 2
44#define MS_INVALIDATE 4
45
46void* mmap(void *addr, size_t len, int prot, int flags, int fildes, off_t off);
47int munmap(void *addr, size_t len);
48int mprotect(void *addr, size_t len, int prot);
49int msync(void *addr, size_t len, int flags);
50int mlock(const void *addr, size_t len);
51int munlock(const void *addr, size_t len);
52
53#ifdef __cplusplus
54};
55#endif
56
57#endif /* _SYS_MMAN_H_ */
58
int munmap(void *addr, size_t len)
int msync(void *addr, size_t len, int flags)
int mlock(const void *addr, size_t len)
int mprotect(void *addr, size_t len, int prot)
void * mmap(void *addr, size_t len, int prot, int flags, int fildes, off_t off)
int munlock(const void *addr, size_t len)