sys/{mman,shm}.h: add {MAP,SHM}_HUGE_ macros from linux uapi
authorSzabolcs Nagy <nsz@port70.net>
Sun, 26 Nov 2017 23:58:25 +0000 (23:58 +0000)
committerRich Felker <dalias@aerifal.cx>
Thu, 22 Feb 2018 23:48:12 +0000 (18:48 -0500)
commitabdaba8616c29b0814a4dbe726224b6f2c9f8604
tree8bf71934fb4141cdd8e519621bd06544062119ef
parentfba3059d72e610944339ab139b01ea0c97d8f7c6
sys/{mman,shm}.h: add {MAP,SHM}_HUGE_ macros from linux uapi

*_HUGE_SHIFT, *_HUGE_2MB, *_HUGE_1GB are documented in the man page,
so add all of the *_HUGE_* macros from linux uapi.

if MAP_HUGETLB is set, top bits of the mmap flags encode the page size.
see the linux commit aafd4562dfee81a40ba21b5ea3cf5e06664bc7f6

if SHM_HUGETLB is set, top bits of the shmget flags encode the page size.
see the linux commit 4da243ac1cf6aeb30b7c555d56208982d66d6d33

*_HUGE_16GB is defined unsigned to avoid signed left shift ub.
include/sys/mman.h
include/sys/shm.h