2000-02-05 00:40:32 +08:00
|
|
|
/* Definitions for POSIX memory map interface. Linux/MIPS version.
|
2014-01-01 19:03:15 +08:00
|
|
|
Copyright (C) 1997-2014 Free Software Foundation, Inc.
|
1997-08-11 02:30:12 +08:00
|
|
|
This file is part of the GNU C Library.
|
|
|
|
|
|
|
|
The GNU C Library is free software; you can redistribute it and/or
|
2001-07-06 12:56:23 +08:00
|
|
|
modify it under the terms of the GNU Lesser General Public
|
|
|
|
License as published by the Free Software Foundation; either
|
|
|
|
version 2.1 of the License, or (at your option) any later version.
|
1997-08-11 02:30:12 +08:00
|
|
|
|
|
|
|
The GNU C Library is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
2001-07-06 12:56:23 +08:00
|
|
|
Lesser General Public License for more details.
|
1997-08-11 02:30:12 +08:00
|
|
|
|
2001-07-06 12:56:23 +08:00
|
|
|
You should have received a copy of the GNU Lesser General Public
|
2012-03-10 07:56:38 +08:00
|
|
|
License along with the GNU C Library. If not, see
|
|
|
|
<http://www.gnu.org/licenses/>. */
|
1997-08-11 02:30:12 +08:00
|
|
|
|
|
|
|
#ifndef _SYS_MMAN_H
|
1997-11-26 12:14:44 +08:00
|
|
|
# error "Never use <bits/mman.h> directly; include <sys/mman.h> instead."
|
1997-08-11 02:30:12 +08:00
|
|
|
#endif
|
|
|
|
|
|
|
|
/* The following definitions basically come from the kernel headers.
|
|
|
|
But the kernel header is not namespace clean. */
|
|
|
|
|
|
|
|
/* These are Linux-specific. */
|
|
|
|
#ifdef __USE_MISC
|
2001-03-27 10:43:47 +08:00
|
|
|
# define MAP_NORESERVE 0x0400 /* don't check for reservations */
|
|
|
|
# define MAP_GROWSDOWN 0x1000 /* stack-like segment */
|
2000-02-05 00:38:20 +08:00
|
|
|
# define MAP_DENYWRITE 0x2000 /* ETXTBSY */
|
2001-03-27 10:43:47 +08:00
|
|
|
# define MAP_EXECUTABLE 0x4000 /* mark it as an executable */
|
|
|
|
# define MAP_LOCKED 0x8000 /* pages are locked */
|
2003-03-07 17:46:33 +08:00
|
|
|
# define MAP_POPULATE 0x10000 /* populate (prefault) pagetables */
|
|
|
|
# define MAP_NONBLOCK 0x20000 /* do not block on IO */
|
2012-03-28 20:37:21 +08:00
|
|
|
# define MAP_STACK 0x40000 /* Allocation is for a stack. */
|
|
|
|
# define MAP_HUGETLB 0x80000 /* Create huge page mapping. */
|
1997-08-11 02:30:12 +08:00
|
|
|
#endif
|
|
|
|
|
2013-03-07 00:36:37 +08:00
|
|
|
#define __MAP_ANONYMOUS 0x0800
|
2006-05-05 22:17:22 +08:00
|
|
|
|
2013-03-07 00:36:37 +08:00
|
|
|
/* Include generic Linux declarations. */
|
|
|
|
#include <bits/mman-linux.h>
|
2006-05-05 22:17:22 +08:00
|
|
|
|
2013-03-07 00:36:37 +08:00
|
|
|
#ifdef __USE_MISC
|
|
|
|
# define MAP_RENAME MAP_ANONYMOUS
|
2006-05-05 22:17:22 +08:00
|
|
|
#endif
|