summaryrefslogtreecommitdiff
path: root/PACE/pace/posix/mman.h
blob: 982b6c73f751e0766164866753e4460f3bb9d47c (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
66
/* $Id$

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

#ifndef PACE_SYS_MMAN_H
#define PACE_SYS_MMAN_H

#include <sys/mman.h>

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

  PACE_INLINE int pace_mlock (const void * addr, size_t len);

  PACE_INLINE int pace_mlockall (int flags);

  PACE_INLINE void * pace_mmap (void * addr,
                                size_t len,
                                int prot,
                                int flags,
                                int fildes,
                                off_t off);

  PACE_INLINE int pace_mprotect (void * addr,
                                 size_t len,
                                 int prot);

  PACE_INLINE int pace_msync (void * addr,
                              size_t len,
                              int flags);

  PACE_INLINE int pace_munlock (const void * addr, size_t len);

  PACE_INLINE int pace_munlockall ();

  PACE_INLINE int pace_munmap (void *addr, size_t len);

  PACE_INLINE int pace_shm_open (const char * name,
                                 int oflag,
                                 mode_t mode);
  /* Requires PACE_POSIX_C_SOURCE > 2. */

  PACE_INLINE int pace_shm_unlink (const char * name);
  /* Requires PACE_POSIX_C_SOURCE > 2. */

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

#if defined (PACE_HAS_INLINE)
# include "pace/posix/mman.inl"
#endif /* PACE_HAS_INLINE */

#endif /* PACE_SYS_MMAN_H */