GitHub Actions: Try MSVC builds with /std:c++17 and 20
[ACE_TAO.git] / ACE / ace / OS_NS_sys_mman.h
blob3d976aeaaa17189d1e5134f292960917f2c934ca
1 // -*- C++ -*-
3 //=============================================================================
4 /**
5 * @file OS_NS_sys_mman.h
7 * @author Douglas C. Schmidt <d.schmidt@vanderbilt.edu>
8 * @author Jesper S. M|ller<stophph@diku.dk>
9 * @author and a cast of thousands...
11 * Originally in OS.h.
13 //=============================================================================
15 #ifndef ACE_OS_NS_SYS_MMAN_H
16 # define ACE_OS_NS_SYS_MMAN_H
18 # include /**/ "ace/pre.h"
20 # include "ace/config-all.h"
22 # if !defined (ACE_LACKS_PRAGMA_ONCE)
23 # pragma once
24 # endif /* ACE_LACKS_PRAGMA_ONCE */
26 #include "ace/Global_Macros.h"
27 #include "ace/os_include/sys/os_types.h"
28 #include "ace/os_include/sys/os_mman.h"
29 #include /**/ "ace/ACE_export.h"
31 #if defined (ACE_EXPORT_MACRO)
32 # undef ACE_EXPORT_MACRO
33 #endif
34 #define ACE_EXPORT_MACRO ACE_Export
36 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
38 namespace ACE_OS
41 //@{ @name A set of wrappers for memory mapped files.
42 ACE_NAMESPACE_INLINE_FUNCTION
43 int madvise (caddr_t addr,
44 size_t len,
45 int map_advice);
47 ACE_NAMESPACE_INLINE_FUNCTION
48 void *mmap (void *addr,
49 size_t len,
50 int prot,
51 int flags,
52 ACE_HANDLE handle,
53 ACE_OFF_T off = 0,
54 ACE_HANDLE *file_mapping = 0,
55 LPSECURITY_ATTRIBUTES sa = 0,
56 const ACE_TCHAR *file_mapping_name = 0);
58 ACE_NAMESPACE_INLINE_FUNCTION
59 int mprotect (void *addr,
60 size_t len,
61 int prot);
63 ACE_NAMESPACE_INLINE_FUNCTION
64 int msync (void *addr,
65 size_t len,
66 int sync);
68 ACE_NAMESPACE_INLINE_FUNCTION
69 int munmap (void *addr,
70 size_t len);
71 //@}
73 ACE_NAMESPACE_INLINE_FUNCTION
74 ACE_HANDLE shm_open (const ACE_TCHAR *filename,
75 int mode,
76 mode_t perms = 0,
77 LPSECURITY_ATTRIBUTES sa = 0);
79 ACE_NAMESPACE_INLINE_FUNCTION
80 int shm_unlink (const ACE_TCHAR *path);
82 } /* namespace ACE_OS */
84 ACE_END_VERSIONED_NAMESPACE_DECL
86 # if defined (ACE_HAS_INLINED_OSCALLS)
87 # if defined (ACE_INLINE)
88 # undef ACE_INLINE
89 # endif /* ACE_INLINE */
90 # define ACE_INLINE inline
91 # include "ace/OS_NS_sys_mman.inl"
92 # endif /* ACE_HAS_INLINED_OSCALLS */
94 # include /**/ "ace/post.h"
95 #endif /* ACE_OS_NS_SYS_MMAN_H */