Add SHM_HUGETLB, SHM_NORESERVE to bits/shm.h
Commit Message
Linux 4.14 adds SHM_HUGETLB and SHM_NORESERVE to
include/uapi/linux/shm.h. (These macros previously existed in the
kernel, but in the non-UAPI header.) This patch adds them to
bits/shm.h accordingly.
Tested for x86_64, and with build-many-glibcs.py.
2017-11-16 Joseph Myers <joseph@codesourcery.com>
* sysdeps/unix/sysv/linux/bits/shm.h (SHM_HUGETLB): New macro.
(SHM_NORESERVE): Likewise.
* sysdeps/unix/sysv/linux/alpha/bits/shm.h (SHM_HUGETLB):
Likewise.
(SHM_NORESERVE): Likewise.
* sysdeps/unix/sysv/linux/arm/bits/shm.h (SHM_HUGETLB): Likewise.
(SHM_NORESERVE): Likewise.
* sysdeps/unix/sysv/linux/generic/bits/shm.h (SHM_HUGETLB):
Likewise.
(SHM_NORESERVE): Likewise.
* sysdeps/unix/sysv/linux/hppa/bits/shm.h (SHM_HUGETLB): Likewise.
(SHM_NORESERVE): Likewise.
* sysdeps/unix/sysv/linux/ia64/bits/shm.h (SHM_HUGETLB): Likewise.
(SHM_NORESERVE): Likewise.
* sysdeps/unix/sysv/linux/mips/bits/shm.h (SHM_HUGETLB): Likewise.
(SHM_NORESERVE): Likewise.
* sysdeps/unix/sysv/linux/powerpc/bits/shm.h (SHM_HUGETLB):
Likewise.
(SHM_NORESERVE): Likewise.
* sysdeps/unix/sysv/linux/s390/bits/shm.h (SHM_HUGETLB): Likewise.
(SHM_NORESERVE): Likewise.
* sysdeps/unix/sysv/linux/sh/bits/shm.h (SHM_HUGETLB): Likewise.
(SHM_NORESERVE): Likewise.
* sysdeps/unix/sysv/linux/sparc/bits/shm.h (SHM_HUGETLB):
Likewise.
(SHM_NORESERVE): Likewise.
* sysdeps/unix/sysv/linux/x86/bits/shm.h (SHM_HUGETLB): Likewise.
(SHM_NORESERVE): Likewise.
Comments
On Thu, Nov 16, 2017 at 09:14:04PM +0000, Joseph Myers wrote:
> Linux 4.14 adds SHM_HUGETLB and SHM_NORESERVE to
> include/uapi/linux/shm.h. (These macros previously existed in the
> kernel, but in the non-UAPI header.) This patch adds them to
> bits/shm.h accordingly.
>
> Tested for x86_64, and with build-many-glibcs.py.
>
> 2017-11-16 Joseph Myers <joseph@codesourcery.com>
>
> * sysdeps/unix/sysv/linux/bits/shm.h (SHM_HUGETLB): New macro.
> (SHM_NORESERVE): Likewise.
> * sysdeps/unix/sysv/linux/alpha/bits/shm.h (SHM_HUGETLB):
> Likewise.
> (SHM_NORESERVE): Likewise.
> * sysdeps/unix/sysv/linux/arm/bits/shm.h (SHM_HUGETLB): Likewise.
> (SHM_NORESERVE): Likewise.
> * sysdeps/unix/sysv/linux/generic/bits/shm.h (SHM_HUGETLB):
> Likewise.
> (SHM_NORESERVE): Likewise.
> * sysdeps/unix/sysv/linux/hppa/bits/shm.h (SHM_HUGETLB): Likewise.
> (SHM_NORESERVE): Likewise.
> * sysdeps/unix/sysv/linux/ia64/bits/shm.h (SHM_HUGETLB): Likewise.
> (SHM_NORESERVE): Likewise.
> * sysdeps/unix/sysv/linux/mips/bits/shm.h (SHM_HUGETLB): Likewise.
> (SHM_NORESERVE): Likewise.
> * sysdeps/unix/sysv/linux/powerpc/bits/shm.h (SHM_HUGETLB):
> Likewise.
> (SHM_NORESERVE): Likewise.
> * sysdeps/unix/sysv/linux/s390/bits/shm.h (SHM_HUGETLB): Likewise.
> (SHM_NORESERVE): Likewise.
> * sysdeps/unix/sysv/linux/sh/bits/shm.h (SHM_HUGETLB): Likewise.
> (SHM_NORESERVE): Likewise.
> * sysdeps/unix/sysv/linux/sparc/bits/shm.h (SHM_HUGETLB):
> Likewise.
> (SHM_NORESERVE): Likewise.
> * sysdeps/unix/sysv/linux/x86/bits/shm.h (SHM_HUGETLB): Likewise.
> (SHM_NORESERVE): Likewise.
They are already there (in __USE_MISC section).
@@ -21,9 +21,11 @@
#include <bits/types.h>
-/* Permission flag for shmget. */
+/* Flags for shmget. */
#define SHM_R 0400 /* or S_IRUGO from <linux/stat.h> */
#define SHM_W 0200 /* or S_IWUGO from <linux/stat.h> */
+#define SHM_HUGETLB 04000 /* Segment will use huge TLB pages. */
+#define SHM_NORESERVE 010000 /* Don't check for reservations. */
/* Flags for `shmat'. */
#define SHM_RDONLY 010000 /* attach read-only else read-write */
@@ -21,9 +21,11 @@
#include <bits/types.h>
-/* Permission flag for shmget. */
+/* Flags for shmget. */
#define SHM_R 0400 /* or S_IRUGO from <linux/stat.h> */
#define SHM_W 0200 /* or S_IWUGO from <linux/stat.h> */
+#define SHM_HUGETLB 04000 /* Segment will use huge TLB pages. */
+#define SHM_NORESERVE 010000 /* Don't check for reservations. */
/* Flags for `shmat'. */
#define SHM_RDONLY 010000 /* attach read-only else read-write */
@@ -21,9 +21,11 @@
#include <bits/types.h>
-/* Permission flag for shmget. */
+/* Flags for shmget. */
#define SHM_R 0400 /* or S_IRUGO from <linux/stat.h> */
#define SHM_W 0200 /* or S_IWUGO from <linux/stat.h> */
+#define SHM_HUGETLB 04000 /* Segment will use huge TLB pages. */
+#define SHM_NORESERVE 010000 /* Don't check for reservations. */
/* Flags for `shmat'. */
#define SHM_RDONLY 010000 /* attach read-only else read-write */
@@ -23,9 +23,11 @@
#include <bits/types.h>
#include <bits/wordsize.h>
-/* Permission flag for shmget. */
+/* Flags for shmget. */
#define SHM_R 0400 /* or S_IRUGO from <linux/stat.h> */
#define SHM_W 0200 /* or S_IWUGO from <linux/stat.h> */
+#define SHM_HUGETLB 04000 /* Segment will use huge TLB pages. */
+#define SHM_NORESERVE 010000 /* Don't check for reservations. */
/* Flags for `shmat'. */
#define SHM_RDONLY 010000 /* attach read-only else read-write */
@@ -22,9 +22,11 @@
#include <bits/types.h>
#include <bits/wordsize.h>
-/* Permission flag for shmget. */
+/* Flags for shmget. */
#define SHM_R 0400 /* or S_IRUGO from <linux/stat.h> */
#define SHM_W 0200 /* or S_IWUGO from <linux/stat.h> */
+#define SHM_HUGETLB 04000 /* Segment will use huge TLB pages. */
+#define SHM_NORESERVE 010000 /* Don't check for reservations. */
/* Flags for `shmat'. */
#define SHM_RDONLY 010000 /* attach read-only else read-write */
@@ -21,9 +21,11 @@
#include <sys/types.h>
-/* Permission flag for shmget. */
+/* Flags for shmget. */
#define SHM_R 0400 /* or S_IRUGO from <linux/stat.h> */
#define SHM_W 0200 /* or S_IWUGO from <linux/stat.h> */
+#define SHM_HUGETLB 04000 /* Segment will use huge TLB pages. */
+#define SHM_NORESERVE 010000 /* Don't check for reservations. */
/* Flags for `shmat'. */
#define SHM_RDONLY 010000 /* attach read-only else read-write */
@@ -21,9 +21,11 @@
#include <bits/types.h>
-/* Permission flag for shmget. */
+/* Flags for shmget. */
#define SHM_R 0400 /* or S_IRUGO from <linux/stat.h> */
#define SHM_W 0200 /* or S_IWUGO from <linux/stat.h> */
+#define SHM_HUGETLB 04000 /* Segment will use huge TLB pages. */
+#define SHM_NORESERVE 010000 /* Don't check for reservations. */
/* Flags for `shmat'. */
#define SHM_RDONLY 010000 /* attach read-only else read-write */
@@ -21,9 +21,11 @@
#include <bits/types.h>
-/* Permission flag for shmget. */
+/* Flags for shmget. */
#define SHM_R 0400 /* or S_IRUGO from <linux/stat.h> */
#define SHM_W 0200 /* or S_IWUGO from <linux/stat.h> */
+#define SHM_HUGETLB 04000 /* Segment will use huge TLB pages. */
+#define SHM_NORESERVE 010000 /* Don't check for reservations. */
/* Flags for `shmat'. */
#define SHM_RDONLY 010000 /* attach read-only else read-write */
@@ -22,9 +22,11 @@
#include <bits/types.h>
#include <bits/wordsize.h>
-/* Permission flag for shmget. */
+/* Flags for shmget. */
#define SHM_R 0400 /* or S_IRUGO from <linux/stat.h> */
#define SHM_W 0200 /* or S_IWUGO from <linux/stat.h> */
+#define SHM_HUGETLB 04000 /* Segment will use huge TLB pages. */
+#define SHM_NORESERVE 010000 /* Don't check for reservations. */
/* Flags for `shmat'. */
#define SHM_RDONLY 010000 /* attach read-only else read-write */
@@ -21,9 +21,11 @@
#include <bits/types.h>
-/* Permission flag for shmget. */
+/* Flags for shmget. */
#define SHM_R 0400 /* or S_IRUGO from <linux/stat.h> */
#define SHM_W 0200 /* or S_IWUGO from <linux/stat.h> */
+#define SHM_HUGETLB 04000 /* Segment will use huge TLB pages. */
+#define SHM_NORESERVE 010000 /* Don't check for reservations. */
/* Flags for `shmat'. */
#define SHM_RDONLY 010000 /* attach read-only else read-write */
@@ -22,9 +22,11 @@
#include <bits/types.h>
#include <bits/wordsize.h>
-/* Permission flag for shmget. */
+/* Flags for shmget. */
#define SHM_R 0400 /* or S_IRUGO from <linux/stat.h> */
#define SHM_W 0200 /* or S_IWUGO from <linux/stat.h> */
+#define SHM_HUGETLB 04000 /* Segment will use huge TLB pages. */
+#define SHM_NORESERVE 010000 /* Don't check for reservations. */
/* Flags for `shmat'. */
#define SHM_RDONLY 010000 /* attach read-only else read-write */
@@ -21,9 +21,11 @@
#include <bits/types.h>
-/* Permission flag for shmget. */
+/* Flags for shmget. */
#define SHM_R 0400 /* or S_IRUGO from <linux/stat.h> */
#define SHM_W 0200 /* or S_IWUGO from <linux/stat.h> */
+#define SHM_HUGETLB 04000 /* Segment will use huge TLB pages. */
+#define SHM_NORESERVE 010000 /* Don't check for reservations. */
/* Flags for `shmat'. */
#define SHM_RDONLY 010000 /* attach read-only else read-write */