Synesis Software

Main Page   Compound List   File List   Compound Members   File Members  

/freelibs/unixem/include/sys/mman.h

Go to the documentation of this file.
00001 /* 
00002  * File:        mman.h (sys/mman.h)
00003  *
00004  * Purpose:     Declaration of the mmap() and munmap() API functions.
00005  *
00006  * Created      18th December 2003
00007  * Updated:     3rd January 2004
00008  *
00009  * Author:      Matthew Wilson, Synesis Software Pty Ltd.
00010  *
00011  * License:     (Licensed under the Synesis Software Standard Source License)
00012  *
00013  *              Copyright (C) 2002, Synesis Software Pty Ltd.
00014  *
00015  *              All rights reserved.
00016  *
00017  *              www:        http://www.synesis.com.au/
00018  *                          http://www.synesis.com.au/software/
00019  *
00020  *              email:      software@synesis.com.au
00021  *                          software@synesis-group.com
00022  *
00023  *              Redistribution and use in source and binary forms, with or
00024  *              without modification, are permitted provided that the following
00025  *              conditions are met:
00026  *
00027  *              (i) Redistributions of source code must retain the above
00028  *              copyright notice and contact information, this list of
00029  *              conditions and the following disclaimer.
00030  *
00031  *              (ii) Any derived versions of this software (howsoever modified)
00032  *              remain the sole property of Synesis Software.
00033  *
00034  *              (iii) Any derived versions of this software (howsoever modified)
00035  *              remain subject to all these conditions.
00036  *
00037  *              (iv) Neither the name of Synesis Software nor the names of any
00038  *              subdivisions, employees or agents of Synesis Software, nor the
00039  *              names of any other contributors to this software may be used to
00040  *              endorse or promote products derived from this software without
00041  *              specific prior written permission.
00042  *
00043  *              This source code is provided by Synesis Software "as is" and any
00044  *              warranties, whether expressed or implied, including, but not
00045  *              limited to, the implied warranties of merchantability and
00046  *              fitness for a particular purpose are disclaimed. In no event
00047  *              shall the Synesis Software be liable for any direct, indirect,
00048  *              incidental, special, exemplary, or consequential damages
00049  *              (including, but not limited to, procurement of substitute goods
00050  *              or services; loss of use, data, or profits; or business
00051  *              interruption) however caused and on any theory of liability,
00052  *              whether in contract, strict liability, or tort (including
00053  *              negligence or otherwise) arising in any way out of the use of
00054  *              this software, even if advised of the possibility of such
00055  *              damage.
00056  *
00057  * 
00058 
00059 
00060 #ifndef _SYNSOFT_INCL_H_SYS_MMAP
00061 #define _SYNSOFT_INCL_H_SYS_MMAP
00062 
00063 #ifndef _SYNSOFT_DOCUMENTATION_SKIP_SECTION
00064 # define _SYNSOFT_VER_H_SYS_MMAP_MAJOR      1
00065 # define _SYNSOFT_VER_H_SYS_MMAP_MINOR      1
00066 # define _SYNSOFT_VER_H_SYS_MMAP_REVISION   3
00067 # define _SYNSOFT_VER_H_SYS_MMAP_EDIT       5
00068 #endif /* !_SYNSOFT_DOCUMENTATION_SKIP_SECTION */
00069 
00070 #include <sys/types.h>
00071 
00072 /* 
00073 
00074 #ifndef WIN32
00075 # error This file is only currently defined for Win32 compilation units
00076 #endif /* WIN32 */
00077 
00078 /* 
00079  * Constants and definitions
00080  */
00081 
00082 #define PROT_READ       0x1             
00083 #define PROT_WRITE      0x2             
00084 #define PROT_EXEC       0x4             
00085 #define PROT_NONE       0x0             
00087 #define MAP_PRIVATE     0x02            
00088 #define MAP_ANONYMOUS   0x20                    
00089 #define MAP_FIXED               0x10            
00091 #define MAP_FAILED      ((void*)-1)                     
00093 /* 
00094  * API functions
00095  */
00096 
00097 #ifdef __cplusplus
00098 extern "C"
00099 {
00100 #endif /* __cplusplus */
00101 
00120 void *mmap(void *addr, size_t len, int prot, int flags, int fd, off_t offset);
00121 
00135 int munmap(void *addr, size_t len);
00136 
00144 int msync(void *addr, size_t len, int flags);
00145 
00146 #ifdef __cplusplus
00147 } // extern "C"
00148 #endif /* __cplusplus */
00149 
00150 /* 
00151 
00152 #endif /* _SYNSOFT_INCL_H_SYS_MMAP */
00153 
00154 /* 

UNIX Emulation for Win32 Libraries documentation © Synesis Software Pty Ltd, 2001-2003