Mercurial > mplayer.hg
comparison osdep/mmap.h @ 26076:c4d1f32ca1a4
mmap() support for OS/2
patch by KO Myung-Hun, komh chollian net
author | diego |
---|---|
date | Wed, 27 Feb 2008 22:29:52 +0000 |
parents | |
children | 32ef0c7cb949 |
comparison
equal
deleted
inserted
replaced
26075:c88de0066c55 | 26076:c4d1f32ca1a4 |
---|---|
1 /* | |
2 * mmap declaration header for systems with missing/nonfunctional sys/mman.h | |
3 * | |
4 * Copyright (c) 2008 KO Myung-Hun (komh@chollian.net) | |
5 * | |
6 * This file is part of MPlayer. | |
7 * | |
8 * MPlayer is free software; you can redistribute it and/or modify | |
9 * it under the terms of the GNU General Public License as published by | |
10 * the Free Software Foundation; either version 2 of the License, or | |
11 * (at your option) any later version. | |
12 * | |
13 * MPlayer is distributed in the hope that it will be useful, | |
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
16 * GNU General Public License for more details. | |
17 * | |
18 * You should have received a copy of the GNU General Public License along | |
19 * with MPlayer; if not, write to the Free Software Foundation, Inc., | |
20 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | |
21 */ | |
22 | |
23 #ifndef MPLAYER_MMAP_H | |
24 #define MPLAYER_MMAP_H | |
25 | |
26 /* | |
27 * Protections are chosen from these bits, or-ed together | |
28 */ | |
29 #define PROT_NONE 0x00 /* no permissions */ | |
30 #define PROT_READ 0x01 /* pages can be read */ | |
31 #define PROT_WRITE 0x02 /* pages can be written */ | |
32 #define PROT_EXEC 0x04 /* pages can be executed */ | |
33 | |
34 /* | |
35 * Flags contain sharing type and options. | |
36 * Sharing types; choose one. | |
37 */ | |
38 #define MAP_SHARED 0x0001 /* share changes */ | |
39 #define MAP_PRIVATE 0x0002 /* changes are private */ | |
40 #define MAP_FIXED 0x0010 /* map addr must be exactly as requested */ | |
41 | |
42 /* | |
43 * Mapping type | |
44 */ | |
45 #define MAP_ANON 0x1000 /* allocated from memory, swap space */ | |
46 | |
47 /* MAP_FAILED is defined in config.h */ | |
48 | |
49 #ifndef _MMAP_DECLARED | |
50 #define _MMAP_DECLARED | |
51 void *mmap( void *addr, size_t len, int prot, int flags, int fildes, off_t off ); | |
52 #endif | |
53 int munmap( void *addr, size_t len ); | |
54 int mprotect( void *addr, size_t len, int prot ); | |
55 | |
56 #endif /* MPLAYER_MMAP_H */ |