source: rtems-tools/rtemstoolkit/win32/sys/mman.h @ 3badbb0

4.104.115
Last change on this file since 3badbb0 was 3badbb0, checked in by Chris Johns <chrisj@…>, on 01/18/15 at 07:12:18

Add support to cross-compile. Use --hosti=.

On FreeBSD use --host=mingw32 for Windows. If you use another
OS you might need to add the specific windows host to the
top level wscript file.

  • Property mode set to 100644
File size: 3.0 KB
Line 
1/*-
2 * Copyright (c) 1982, 1986, 1993
3 *      The Regents of the University of California.  All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright
9 *    notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright
11 *    notice, this list of conditions and the following disclaimer in the
12 *    documentation and/or other materials provided with the distribution.
13 * 4. Neither the name of the University nor the names of its contributors
14 *    may be used to endorse or promote products derived from this software
15 *    without specific prior written permission.
16 *
17 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
18 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20 * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
21 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 *
29 *      @(#)mman.h      8.2 (Berkeley) 1/9/95
30 * $FreeBSD: releng/9.0/sys/sys/mman.h 211937 2010-08-28 16:57:07Z alc $
31 */
32
33#ifndef _SYS_MMAN_H_
34#define _SYS_MMAN_H_
35
36#include <sys/cdefs.h>
37#include <sys/types.h>
38
39/*
40 * Protections are chosen from these bits, or-ed together
41 */
42#define PROT_NONE       0x00    /* no permissions */
43#define PROT_READ       0x01    /* pages can be read */
44#define PROT_WRITE      0x02    /* pages can be written */
45#define PROT_EXEC       0x04    /* pages can be executed */
46
47/*
48 * Flags contain sharing type and options.
49 * Sharing types; choose one.
50 */
51#define MAP_SHARED      0x0001          /* share changes */
52#define MAP_PRIVATE     0x0002          /* changes are private */
53
54/*
55 * Other flags
56 */
57#define MAP_FIXED        0x0010 /* map addr must be exactly as requested */
58
59/*
60 * Mapping type
61 */
62#define MAP_FILE         0x0000 /* map from file (default) */
63#define MAP_ANON         0x1000 /* allocated from memory, swap space */
64
65/*
66 * Error return from mmap()
67 */
68#define MAP_FAILED      ((void *)-1)
69
70/*
71 * msync() flags
72 */
73#define MS_SYNC         0x0000  /* msync synchronously */
74#define MS_ASYNC        0x0001  /* return immediately */
75#define MS_INVALIDATE   0x0002  /* invalidate all cached data */
76
77__BEGIN_DECLS
78#ifndef _MMAP_DECLARED
79#define _MMAP_DECLARED
80void *  mmap(void *, size_t, int, int, int, off_t);
81#endif
82#if NOT_IMPLEMENTED
83int     mprotect(const void *, size_t, int);
84int     msync(void *, size_t, int);
85int     munlock(const void *, size_t);
86#endif
87int     munmap(void *, size_t);
88__END_DECLS
89
90#endif /* !_SYS_MMAN_H_ */
Note: See TracBrowser for help on using the repository browser.