![]() |
|||||
|
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: 16th June 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-2004, 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 00065 #ifndef _SYNSOFT_INCL_H_SYS_MMAP 00066 #define _SYNSOFT_INCL_H_SYS_MMAP 00067 00068 #ifndef _SYNSOFT_DOCUMENTATION_SKIP_SECTION 00069 # define _SYNSOFT_VER_H_SYS_MMAP_MAJOR 1 00070 # define _SYNSOFT_VER_H_SYS_MMAP_MINOR 1 00071 # define _SYNSOFT_VER_H_SYS_MMAP_REVISION 5 00072 # define _SYNSOFT_VER_H_SYS_MMAP_EDIT 8 00073 #endif /* !_SYNSOFT_DOCUMENTATION_SKIP_SECTION */ 00074 00075 #include <sys/types.h> 00076 00077 /* 00078 00089 /* 00090 00091 #ifndef WIN32 00092 # error This file is only currently defined for Win32 compilation units 00093 #endif /* WIN32 */ 00094 00095 /* 00096 * Constants and definitions 00097 */ 00098 00099 #define PROT_READ 0x1 00100 #define PROT_WRITE 0x2 00101 #define PROT_EXEC 0x4 00102 #define PROT_NONE 0x0 00104 #define MAP_PRIVATE 0x02 00105 #define MAP_ANONYMOUS 0x20 00106 #define MAP_FIXED 0x10 00108 #define MAP_FAILED ((void*)-1) 00110 /* 00111 * API functions 00112 */ 00113 00114 #ifdef __cplusplus 00115 extern "C" 00116 { 00117 #endif /* __cplusplus */ 00118 00137 void *mmap(void *addr, size_t len, int prot, int flags, int fd, off_t offset); 00138 00152 int munmap(void *addr, size_t len); 00153 00161 int msync(void *addr, size_t len, int flags); 00162 00163 #ifdef __cplusplus 00164 } // extern "C" 00165 #endif /* __cplusplus */ 00166 00167 /* 00168 00171 /* 00172 00173 #endif /* _SYNSOFT_INCL_H_SYS_MMAP */ 00174 00175 /*
|
UNIX Emulation for Win32 Libraries documentation © Synesis Software Pty Ltd, 2001-2003 |