OS_NS_sys_mman.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 //=============================================================================
00004 /**
00005  *  @file   OS_NS_sys_mman.h
00006  *
00007  *  OS_NS_sys_mman.h,v 1.5 2005/10/28 16:14:54 ossama Exp
00008  *
00009  *  @author Douglas C. Schmidt <schmidt@cs.wustl.edu>
00010  *  @author Jesper S. M|ller<stophph@diku.dk>
00011  *  @author and a cast of thousands...
00012  *
00013  *  Originally in OS.h.
00014  */
00015 //=============================================================================
00016 
00017 #ifndef ACE_OS_NS_SYS_MMAN_H
00018 # define ACE_OS_NS_SYS_MMAN_H
00019 
00020 # include /**/ "ace/pre.h"
00021 
00022 # include "ace/config-all.h"
00023 
00024 # if !defined (ACE_LACKS_PRAGMA_ONCE)
00025 #  pragma once
00026 # endif /* ACE_LACKS_PRAGMA_ONCE */
00027 
00028 #include "ace/Global_Macros.h"
00029 #include "ace/os_include/sys/os_types.h"
00030 #include "ace/os_include/sys/os_mman.h"
00031 #include "ace/ACE_export.h"
00032 
00033 #if defined (ACE_EXPORT_MACRO)
00034 #  undef ACE_EXPORT_MACRO
00035 #endif
00036 #define ACE_EXPORT_MACRO ACE_Export
00037 
00038 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
00039 
00040 namespace ACE_OS
00041 {
00042 
00043   //@{ @name A set of wrappers for memory mapped files.
00044   ACE_NAMESPACE_INLINE_FUNCTION
00045   int madvise (caddr_t addr,
00046                size_t len,
00047                int map_advice);
00048 
00049   ACE_NAMESPACE_INLINE_FUNCTION
00050   void *mmap (void *addr,
00051               size_t len,
00052               int prot,
00053               int flags,
00054               ACE_HANDLE handle,
00055               off_t off = 0,
00056               ACE_HANDLE *file_mapping = 0,
00057               LPSECURITY_ATTRIBUTES sa = 0,
00058               const ACE_TCHAR *file_mapping_name = 0);
00059 
00060   ACE_NAMESPACE_INLINE_FUNCTION
00061   int mprotect (void *addr,
00062                 size_t len,
00063                 int prot);
00064 
00065   ACE_NAMESPACE_INLINE_FUNCTION
00066   int msync (void *addr,
00067              size_t len,
00068              int sync);
00069 
00070   ACE_NAMESPACE_INLINE_FUNCTION
00071   int munmap (void *addr,
00072               size_t len);
00073   //@}
00074 
00075   ACE_NAMESPACE_INLINE_FUNCTION
00076   ACE_HANDLE shm_open (const ACE_TCHAR *filename,
00077                        int mode,
00078                        int perms = 0,
00079                        LPSECURITY_ATTRIBUTES sa = 0);
00080 
00081   ACE_NAMESPACE_INLINE_FUNCTION
00082   int shm_unlink (const ACE_TCHAR *path);
00083 
00084 } /* namespace ACE_OS */
00085 
00086 ACE_END_VERSIONED_NAMESPACE_DECL
00087 
00088 # if defined (ACE_HAS_INLINED_OSCALLS)
00089 #   if defined (ACE_INLINE)
00090 #     undef ACE_INLINE
00091 #   endif /* ACE_INLINE */
00092 #   define ACE_INLINE inline
00093 #   include "ace/OS_NS_sys_mman.inl"
00094 # endif /* ACE_HAS_INLINED_OSCALLS */
00095 
00096 # include /**/ "ace/post.h"
00097 #endif /* ACE_OS_NS_SYS_MMAN_H */

Generated on Thu Nov 9 09:41:58 2006 for ACE by doxygen 1.3.6