Skip to content
Navigation Menu
Toggle navigation
Sign in
In this repository
All GitHub Enterprise
↵
Jump to
↵
No suggested jump to results
In this repository
All GitHub Enterprise
↵
Jump to
↵
In this organization
All GitHub Enterprise
↵
Jump to
↵
In this repository
All GitHub Enterprise
↵
Jump to
↵
Sign in
Reseting focus
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Dismiss alert
{{ message }}
git-mirror
/
glibc
Public
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
0
Security
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security
Insights
Files
dd62fda
abilist
argp
assert
bits
catgets
conf
conform
crypt
csu
ctype
debug
dirent
dlfcn
elf
gmon
gnulib
grp
gshadow
hesiod
hurd
iconv
iconvdata
include
inet
intl
io
libidn
libio
locale
localedata
login
mach
malloc
manual
math
misc
nis
nptl
nptl_db
nscd
nss
po
posix
pwd
resolv
resource
rt
scripts
setjmp
shadow
signal
socket
soft-fp
stdio-common
stdlib
streams
string
sunrpc
sysdeps
generic
gnu
i386
ieee754
mach
posix
powerpc
pthread
s390
sh
sparc
unix
bsd
common
i386
inet
mman
powerpc
sh
sparc
sysv
bits
i386
linux
bits
i386
net
netash
netatalk
netax25
neteconet
netinet
netipx
netiucv
netpacket
netrom
netrose
nfs
powerpc
s390
scsi
sh
bits
atomic.h
fcntl.h
mman.h
shm.h
sh3
sh4
sys
Makefile
Versions
brk.c
chown.c
clone.S
fchown.c
fchownat.c
fcntl.c
fxstat.c
fxstatat.c
getegid.c
geteuid.c
getgroups.c
getresgid.c
getresuid.c
getrlimit.c
getrlimit64.c
getuid.c
lchown.c
lockf64.c
lxstat.c
makecontext.S
msgctl.c
pipe.S
pread.c
pread64.c
profil-counter.h
pwrite.c
pwrite64.c
semctl.c
setegid.c
seteuid.c
setfsgid.c
setfsuid.c
setgid.c
setgroups.c
setregid.c
setresgid.c
setresuid.c
setreuid.c
setrlimit.c
setuid.c
shmctl.c
sigcontextinfo.h
socket.S
syscall.S
syscalls.list
sysdep.S
sysdep.h
vfork.S
xstat.c
sparc
sys
wordsize-64
x86_64
Implies
Makefile
Versions
_exit.c
a.out.h
accept.S
accept4.c
adjtime.c
aio_sigqueue.c
bind.S
check_native.c
check_pf.c
clock.c
clock_getcpuclockid.c
clock_getres.c
clock_gettime.c
clock_nanosleep.c
clock_settime.c
cmsg_nxthdr.c
configure
configure.in
connect.S
device-nrs.h
dl-brk.c
dl-execstack.c
dl-fxstatat64.c
dl-getcwd.c
dl-librecon.h
dl-openat64.c
dl-opendir.c
dl-origin.c
dl-osinfo.h
dl-sbrk.c
dl-sysdep.c
dl-sysdep.h
dl-vdso.c
dl-vdso.h
epoll_pwait.c
errqueue.h
eventfd.c
eventfd_read.c
eventfd_write.c
execve.c
exit-thread.S
faccessat.c
fallocate.c
fallocate64.c
fatal-prepare.h
fchmodat.c
fchownat.c
fcntl.c
fd_to_filename.h
fexecve.c
fpathconf.c
fstatfs64.c
fstatvfs.c
fstatvfs64.c
ftime.c
ftruncate64.c
futimens.c
futimes.c
futimesat.c
fxstat.c
fxstat64.c
fxstatat.c
fxstatat64.c
gai_sigqueue.c
getclktck.c
getcwd.c
getdents.c
getdents64.c
getdirentries.c
getdirentries64.c
getdtsz.c
gethostid.c
getipv4sourcefilter.c
getloadavg.c
getlogin.c
getlogin_r.c
getpagesize.c
getpeername.S
getpriority.c
getpt.c
getrlimit64.c
getsockname.S
getsockopt.S
getsourcefilter.c
getsysstats.c
grantpt.c
if_index.c
ifaddrs.c
ifreq.c
init-first.c
internal_accept4.S
internal_recvmmsg.S
internal_sendmmsg.S
internal_statvfs.c
internal_statvfs64.c
ipc_priv.h
kernel-features.h
kernel-posix-cpu-timers.h
kernel_sigaction.h
kernel_stat.h
kernel_termios.h
ldd-rewrite.sed
lddlibc4.c
ldsodefs.h
libc_fatal.c
linkat.c
linux_fsinfo.h
listen.S
llseek.c
local-setxid.h
lseek64.c
lutimes.c
lxstat.c
lxstat64.c
makedev.c
mkdirat.c
mmap64.c
mq_close.c
mq_getattr.c
mq_notify.c
mq_open.c
mq_receive.c
mq_send.c
mq_unlink.c
msgctl.c
msgget.c
msgrcv.c
msgsnd.c
netlinkaccess.h
nice.c
not-cancel.h
nscd_setup_thread.c
ntp_gettime.c
ntp_gettimex.c
open64.c
open64_2.c
open_2.c
openat.c
openat64.c
opendir.c
opensock.c
pathconf.c
pathconf.h
paths.h
poll.c
posix_fadvise.c
posix_fadvise64.c
posix_fallocate.c
posix_fallocate64.c
posix_madvise.c
ppoll.c
pread.c
pread64.c
preadv.c
preadv64.c
prlimit.c
prof-freq.c
profil.c
pselect.c
ptrace.c
ptsname.c
pwrite.c
pwrite64.c
pwritev.c
pwritev64.c
readahead.c
readdir64.c
readdir64_r.c
readlinkat.c
readonly-area.c
readv.c
reboot.c
recv.S
recvfrom.S
recvmmsg.c
recvmsg.S
remove.c
renameat.c
sa_len.c
sched_getaffinity.c
sched_getcpu.c
sched_setaffinity.c
segfault.c
semctl.c
semget.c
semop.c
semtimedop.c
send.S
sendmmsg.c
sendmsg.S
sendto.S
setegid.c
seteuid.c
setgid.c
setgroups.c
sethostid.c
setipv4sourcefilter.c
setregid.c
setresgid.c
setresuid.c
setreuid.c
setrlimit64.c
setsockopt.S
setsourcefilter.c
setuid.c
shm_open.c
shm_unlink.c
shmat.c
shmctl.c
shmdt.c
shmget.c
shutdown.S
sigaction.c
siglist.h
signal.c
signalfd.c
sigpending.c
sigprocmask.c
sigqueue.c
sigreturn.c
sigset-cvt-mask.h
sigstack.c
sigsuspend.c
sigtimedwait.c
sigwait.c
sigwaitinfo.c
sizes.h
sleep.c
socketcall.h
socketpair.S
speed.c
statfs64.c
statvfs.c
statvfs64.c
symlinkat.c
sync_file_range.c
syscalls.list
sysconf.c
sysctl.c
syslog.c
system.c
tcdrain.c
tcflow.c
tcflush.c
tcgetattr.c
tcgetpgrp.c
tcsetattr.c
tcsetpgrp.c
termio.h
testrtsig.h
time.c
times.c
timespec_get.c
truncate64.c
tst-clone.c
tst-getcpu.c
ttyname.c
ttyname_r.c
ualarm.c
ulimit.c
umount.S
umount2.S
unlinkat.c
unlockpt.c
updwtmp.c
usleep.c
ustat.c
utimensat.c
utimes.c
utmp_file.c
vfork.c
wait.c
wait3.c
waitid.c
waitpid.c
writev.c
xmknod.c
xmknodat.c
xstat.c
xstat64.c
xstatconv.c
xstatconv.h
Makefile
Versions
direct.h
getdents.c
gethostname.c
setrlimit.c
settimeofday.c
sigaction.c
syscalls.list
sysv_termio.h
tcdrain.c
tcflow.c
tcflush.c
tcgetattr.c
tcgetpgrp.c
tcsendbrk.c
tcsetattr.c
tcsetpgrp.c
x86_64
Implies
Makefile
Subdirs
_exit.S
alarm.c
clock_gettime.c
clock_nanosleep.c
clock_settime.c
closedir.c
confstr.h
dirfd.c
dirstream.h
execve.S
fdopendir.c
fork.S
fxstat.c
get_child_max.c
getdents.c
getegid.S
geteuid.S
getlogin.c
getlogin_r.c
getpagesize.c
getppid.S
grantpt.c
make-syscalls.sh
mkdir.c
mkfifo.c
mkfifoat.c
nice.c
opendir.c
readdir.c
readdir_r.c
rewinddir.c
rmdir.c
s-proto-bp.S
s-proto-cancel.S
s-proto.S
seekdir.c
setxid.h
siglist.c
sockatmark.c
stime.c
syscall-template.S
syscall.S
syscalls.list
sysdep.h
system.c
telldir.c
time.c
utime.c
xmknod.c
xstat.c
wordsize-32
wordsize-64
x86_64
sysvipc
termios
time
timezone
wcsmbs
wctype
.gitattributes
.gitignore
BUGS
CANCEL-FCT-WAIVE
CANCEL-FILE-WAIVE
CONFORMANCE
COPYING
COPYING.LIB
ChangeLog
ChangeLog.1
ChangeLog.10
ChangeLog.11
ChangeLog.12
ChangeLog.13
ChangeLog.14
ChangeLog.15
ChangeLog.16
ChangeLog.17
ChangeLog.2
ChangeLog.3
ChangeLog.4
ChangeLog.5
ChangeLog.6
ChangeLog.7
ChangeLog.8
ChangeLog.9
FAQ
FAQ.in
INSTALL
LICENSES
Makeconfig
Makefile
Makefile.in
Makerules
NAMESPACE
NEWS
PROJECTS
README
README.libm
Rules
Versions.def
WUR-REPORT
abi-tags
aclocal.m4
config.h.in
config.make.in
configure
configure.in
cppflags-iterator.mk
extra-lib.mk
extra-modules.mk
libc-abis
o-iterator.mk
shlib-versions
test-skeleton.c
version.h
Breadcrumbs
glibc
/
sysdeps
/
unix
/
sysv
/
linux
/
sh
/
bits
/
mman.h
Blame
Blame
Latest commit
History
History
109 lines (93 loc) · 4.5 KB
Breadcrumbs
glibc
/
sysdeps
/
unix
/
sysv
/
linux
/
sh
/
bits
/
mman.h
Top
File metadata and controls
Code
Blame
109 lines (93 loc) · 4.5 KB
Raw
/* Definitions for POSIX memory map interface. Linux/SH version. Copyright (C) 1997-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or 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. 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see <http://www.gnu.org/licenses/>. */ #ifndef _SYS_MMAN_H # error "Never include this file directly. Use <sys/mman.h> instead" #endif /* The following definitions basically come from the kernel headers. But the kernel header is not namespace clean. */ /* Protections are chosen from these bits, OR'd together. The implementation does not necessarily support PROT_EXEC or PROT_WRITE without PROT_READ. The only guarantees are that no writing will be allowed without PROT_WRITE and no access will be allowed for PROT_NONE. */ #define PROT_READ 0x1 /* Page can be read. */ #define PROT_WRITE 0x2 /* Page can be written. */ #define PROT_EXEC 0x4 /* Page can be executed. */ #define PROT_NONE 0x0 /* Page can not be accessed. */ #define PROT_GROWSDOWN 0x01000000 /* Extend change to start of growsdown vma (mprotect only). */ #define PROT_GROWSUP 0x02000000 /* Extend change to start of growsup vma (mprotect only). */ /* Sharing types (must choose one and only one of these). */ #define MAP_SHARED 0x01 /* Share changes. */ #define MAP_PRIVATE 0x02 /* Changes are private. */ #ifdef __USE_MISC # define MAP_TYPE 0x0f /* Mask for type of mapping. */ #endif /* Other flags. */ #define MAP_FIXED 0x10 /* Interpret addr exactly. */ #ifdef __USE_MISC # define MAP_FILE 0 # define MAP_ANONYMOUS 0x20 /* Don't use a file. */ # define MAP_ANON MAP_ANONYMOUS #endif /* These are Linux-specific. */ #ifdef __USE_MISC # define MAP_GROWSDOWN 0x0100 /* Stack-like segment. */ # define MAP_DENYWRITE 0x0800 /* ETXTBSY */ # define MAP_EXECUTABLE 0x1000 /* Mark it as an executable. */ # define MAP_LOCKED 0x2000 /* Lock the mapping. */ # define MAP_NORESERVE 0x4000 /* Don't check for reservations. */ # define MAP_POPULATE 0x8000 /* Populate (prefault) pagetables. */ # define MAP_NONBLOCK 0x10000 /* Do not block on IO. */ # define MAP_STACK 0x20000 /* Allocation is for a stack. */ # define MAP_HUGETLB 0x40000 /* Create huge page mapping. */ #endif /* Flags to `msync'. */ #define MS_ASYNC 1 /* Sync memory asynchronously. */ #define MS_SYNC 4 /* Synchronous memory sync. */ #define MS_INVALIDATE 2 /* Invalidate the caches. */ /* Flags for `mlockall'. */ #define MCL_CURRENT 1 /* Lock all currently mapped pages. */ #define MCL_FUTURE 2 /* Lock all additions to address space. */ /* Flags for `mremap'. */ #ifdef __USE_GNU # define MREMAP_MAYMOVE 1 # define MREMAP_FIXED 2 #endif /* Advice to `madvise'. */ #ifdef __USE_BSD # define MADV_NORMAL 0 /* No further special treatment. */ # define MADV_RANDOM 1 /* Expect random page references. */ # define MADV_SEQUENTIAL 2 /* Expect sequential page references. */ # define MADV_WILLNEED 3 /* Will need these pages. */ # define MADV_DONTNEED 4 /* Don't need these pages. */ # define MADV_REMOVE 9 /* Remove these pages and resources. */ # define MADV_DONTFORK 10 /* Do not inherit across fork. */ # define MADV_DOFORK 11 /* Do inherit across fork. */ # define MADV_MERGEABLE 12 /* KSM may merge identical pages. */ # define MADV_UNMERGEABLE 13 /* KSM may not merge identical pages. */ # define MADV_HUGEPAGE 14 /* Worth backing with hugepages. */ # define MADV_NOHUGEPAGE 15 /* Not worth backing with hugepages. */ # define MADV_HWPOISON 100 /* Poison a page for testing. */ #endif /* The POSIX people had to invent similar names for the same things. */ #ifdef __USE_XOPEN2K # define POSIX_MADV_NORMAL 0 /* No further special treatment. */ # define POSIX_MADV_RANDOM 1 /* Expect random page references. */ # define POSIX_MADV_SEQUENTIAL 2 /* Expect sequential page references. */ # define POSIX_MADV_WILLNEED 3 /* Will need these pages. */ # define POSIX_MADV_DONTNEED 4 /* Don't need these pages. */ #endif
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
You can’t perform that action at this time.