1997-11-26 04:14:44 +00:00
|
|
|
/* Definitions for POSIX memory map interface. Linux/Alpha version.
|
2022-01-01 18:54:23 +00:00
|
|
|
Copyright (C) 1997-2022 Free Software Foundation, Inc.
|
1997-08-10 17:58:48 +00: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 04:56:23 +00: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-10 17:58:48 +00: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 04:56:23 +00:00
|
|
|
Lesser General Public License for more details.
|
1997-08-10 17:58:48 +00:00
|
|
|
|
2001-07-06 04:56:23 +00:00
|
|
|
You should have received a copy of the GNU Lesser General Public
|
2012-03-09 23:56:38 +00:00
|
|
|
License along with the GNU C Library. If not, see
|
Prefer https to http for gnu.org and fsf.org URLs
Also, change sources.redhat.com to sourceware.org.
This patch was automatically generated by running the following shell
script, which uses GNU sed, and which avoids modifying files imported
from upstream:
sed -ri '
s,(http|ftp)(://(.*\.)?(gnu|fsf|sourceware)\.org($|[^.]|\.[^a-z])),https\2,g
s,(http|ftp)(://(.*\.)?)sources\.redhat\.com($|[^.]|\.[^a-z]),https\2sourceware.org\4,g
' \
$(find $(git ls-files) -prune -type f \
! -name '*.po' \
! -name 'ChangeLog*' \
! -path COPYING ! -path COPYING.LIB \
! -path manual/fdl-1.3.texi ! -path manual/lgpl-2.1.texi \
! -path manual/texinfo.tex ! -path scripts/config.guess \
! -path scripts/config.sub ! -path scripts/install-sh \
! -path scripts/mkinstalldirs ! -path scripts/move-if-change \
! -path INSTALL ! -path locale/programs/charmap-kw.h \
! -path po/libc.pot ! -path sysdeps/gnu/errlist.c \
! '(' -name configure \
-execdir test -f configure.ac -o -f configure.in ';' ')' \
! '(' -name preconfigure \
-execdir test -f preconfigure.ac ';' ')' \
-print)
and then by running 'make dist-prepare' to regenerate files built
from the altered files, and then executing the following to cleanup:
chmod a+x sysdeps/unix/sysv/linux/riscv/configure
# Omit irrelevant whitespace and comment-only changes,
# perhaps from a slightly-different Autoconf version.
git checkout -f \
sysdeps/csky/configure \
sysdeps/hppa/configure \
sysdeps/riscv/configure \
sysdeps/unix/sysv/linux/csky/configure
# Omit changes that caused a pre-commit check to fail like this:
# remote: *** error: sysdeps/powerpc/powerpc64/ppc-mcount.S: trailing lines
git checkout -f \
sysdeps/powerpc/powerpc64/ppc-mcount.S \
sysdeps/unix/sysv/linux/s390/s390-64/syscall.S
# Omit change that caused a pre-commit check to fail like this:
# remote: *** error: sysdeps/sparc/sparc64/multiarch/memcpy-ultra3.S: last line does not end in newline
git checkout -f sysdeps/sparc/sparc64/multiarch/memcpy-ultra3.S
2019-09-07 05:40:42 +00:00
|
|
|
<https://www.gnu.org/licenses/>. */
|
1997-08-10 17:58:48 +00:00
|
|
|
|
|
|
|
#ifndef _SYS_MMAN_H
|
1997-11-26 04:14:44 +00:00
|
|
|
# error "Never use <bits/mman.h> directly; include <sys/mman.h> instead."
|
1997-08-10 17:58:48 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
/* The following definitions basically come from the kernel headers.
|
|
|
|
But the kernel header is not namespace clean. */
|
|
|
|
|
2013-12-06 20:17:01 +00:00
|
|
|
#define __MAP_ANONYMOUS 0x10 /* Don't use a file. */
|
1997-08-10 17:58:48 +00:00
|
|
|
|
|
|
|
/* These are Linux-specific. */
|
|
|
|
#ifdef __USE_MISC
|
2003-03-03 09:58:55 +00:00
|
|
|
# define MAP_GROWSDOWN 0x01000 /* Stack-like segment. */
|
|
|
|
# define MAP_DENYWRITE 0x02000 /* ETXTBSY */
|
|
|
|
# define MAP_EXECUTABLE 0x04000 /* Mark it as an executable. */
|
|
|
|
# define MAP_LOCKED 0x08000 /* Lock the mapping. */
|
1997-08-10 17:58:48 +00:00
|
|
|
# define MAP_NORESERVE 0x10000 /* Don't check for reservations. */
|
2003-03-03 09:58:55 +00:00
|
|
|
# define MAP_POPULATE 0x20000 /* Populate (prefault) pagetables. */
|
|
|
|
# define MAP_NONBLOCK 0x40000 /* Do not block on IO. */
|
2012-04-27 02:07:54 +00:00
|
|
|
# define MAP_STACK 0x80000 /* Allocation is for a stack. */
|
|
|
|
# define MAP_HUGETLB 0x100000 /* Create huge page mapping. */
|
2018-06-05 11:04:46 +00:00
|
|
|
# define MAP_FIXED_NOREPLACE 0x200000 /* MAP_FIXED but do not unmap
|
|
|
|
underlying mapping. */
|
1997-08-10 17:58:48 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
/* Flags for `mlockall'. */
|
2013-12-06 20:17:01 +00:00
|
|
|
#define MCL_CURRENT 8192
|
|
|
|
#define MCL_FUTURE 16384
|
2016-01-12 12:42:55 +00:00
|
|
|
#define MCL_ONFAULT 32768
|
1997-08-10 17:58:48 +00:00
|
|
|
|
2013-12-06 20:17:01 +00:00
|
|
|
#include <bits/mman-linux.h>
|
|
|
|
|
|
|
|
/* Values that differ from standard <mman-linux.h>. For the most part newer
|
|
|
|
values are shared, but older values are skewed. */
|
|
|
|
|
|
|
|
#undef MAP_FIXED
|
|
|
|
#define MAP_FIXED 0x100
|
|
|
|
|
|
|
|
#undef MS_SYNC
|
|
|
|
#define MS_SYNC 2
|
|
|
|
#undef MS_INVALIDATE
|
|
|
|
#define MS_INVALIDATE 4
|
2000-03-20 20:24:41 +00:00
|
|
|
|
2014-02-12 23:41:01 +00:00
|
|
|
#ifdef __USE_MISC
|
2013-12-06 20:17:01 +00:00
|
|
|
# undef MADV_DONTNEED
|
|
|
|
# define MADV_DONTNEED 6
|
2000-03-20 20:24:41 +00:00
|
|
|
#endif
|
2000-04-14 05:57:49 +00:00
|
|
|
#ifdef __USE_XOPEN2K
|
2013-12-06 20:17:01 +00:00
|
|
|
# undef POSIX_MADV_DONTNEED
|
|
|
|
# define POSIX_MADV_DONTNEED 6
|
2000-03-20 20:24:41 +00:00
|
|
|
#endif
|