summaryrefslogtreecommitdiff
path: root/PACE/pace/win32/mman.h
blob: 2a5621823d7d821d057f7bf150e60e13655066c8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
/* $Id$

 * ============================================================================
 *
 * = LIBRARY
 *    pace
 *
 * = FILENAME
 *    pace/win32/mman.h
 *
 * = AUTHOR
 *    Luther Baker
 *
 * ============================================================================ */

#ifndef PACE_SYS_MMAN_H_WIN32
#define PACE_SYS_MMAN_H_WIN32

#if defined (PACE_HAS_CPLUSPLUS)
extern "C" {
#endif /* PACE_HAS_CPLUSPLUS */

# define MAP_PRIVATE 1
# define MAP_SHARED  2
# define MAP_FIXED   4
# if !defined (MAP_FAILED)
#   undef MAP_FAILED
#   define MAP_FAILED ((void *) -1)
# endif

# define PACE_MAP_FAILED MAP_FAILED
# define PACE_MAP_FIXED MAP_FIXED
# define PACE_MAP_PRIVATE MAP_PRIVATE
# define PACE_MAP_SHARED MAP_SHARED
# define PACE_MCL_CURRENT MCL_CURRENT
# define PACE_MS_ASYNC MS_ASYNC
# define PACE_MS_INVALIDATE
# define PACE_MS_SYNC MS_SYNC
# define PACE_PROT_EXEC PROT_EXEC
# define PACE_PROT_NONE PROT_NONE
# define PACE_PROT_READ PROT_READ
# define PACE_PROT_WRITE PROT_WRITE

#if (PACE_HAS_POSIX_NONUOF_FUNCS)
  void * mmap (void * addr, size_t len, int prot, int flags,
               PACE_HANDLE fildes, pace_off_t off);
#endif /* PACE_HAS_POSIX_NONUOF_FUNCS */

#if (PACE_HAS_POSIX_NONUOF_FUNCS)
  int mprotect (void * addr, size_t len, int prot);
#endif /* PACE_HAS_POSIX_NONUOF_FUNCS */

#if (PACE_HAS_POSIX_NONUOF_FUNCS)
  int msync (void * addr, size_t len, int flags);
#endif /* PACE_HAS_POSIX_NONUOF_FUNCS */

#if (PACE_HAS_POSIX_NONUOF_FUNCS)
  int munmap (void * addr, size_t len);
#endif /* PACE_HAS_POSIX_NONUOF_FUNCS */

#if defined (PACE_HAS_CPLUSPLUS)
}
#endif /* PACE_HAS_CPLUSPLUS */

#endif /* PACE_SYS_MMAN_H */