]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Add MAP_SYNC from Linux 4.15.
authorJoseph Myers <joseph@codesourcery.com>
Tue, 6 Feb 2018 00:36:14 +0000 (00:36 +0000)
committerJoseph Myers <joseph@codesourcery.com>
Tue, 6 Feb 2018 00:36:14 +0000 (00:36 +0000)
This patch adds the MAP_SYNC macro from Linux 4.15 to various
bits/mman.h headers.  Note that this is *not* added to all
architectures: in Linux 4.15, this macro is only in
asm-generic/mman.h, and only some architectures' asm/mman.h include
the asm-generic file - the architectures not using the asm-generic
file will need their own values of MAP_SYNC allocated to support this
functionality (some of them also already have conflicting mmap flags
so the value there will have to be different from the generic
0x80000).  Specifically, for glibc architectures, alpha hppa mips
powerpc sparc tile lack allocations of values for MAP_SYNC.

Tested for x86_64.

* sysdeps/unix/sysv/linux/aarch64/bits/mman.h [__USE_MISC]
(MAP_SYNC): New macro.
* sysdeps/unix/sysv/linux/arm/bits/mman.h [__USE_MISC] (MAP_SYNC):
Likewise.
* sysdeps/unix/sysv/linux/ia64/bits/mman.h [__USE_MISC]
(MAP_SYNC): Likewise.
* sysdeps/unix/sysv/linux/m68k/bits/mman.h [__USE_MISC]
(MAP_SYNC): Likewise.
* sysdeps/unix/sysv/linux/microblaze/bits/mman.h [__USE_MISC]
(MAP_SYNC): Likewise.
* sysdeps/unix/sysv/linux/nios2/bits/mman.h [__USE_MISC]
(MAP_SYNC): Likewise.
* sysdeps/unix/sysv/linux/riscv/bits/mman.h [__USE_MISC]
(MAP_SYNC): Likewise.
* sysdeps/unix/sysv/linux/s390/bits/mman.h [__USE_MISC]
(MAP_SYNC): Likewise.
* sysdeps/unix/sysv/linux/sh/bits/mman.h [__USE_MISC] (MAP_SYNC):
Likewise.
* sysdeps/unix/sysv/linux/x86/bits/mman.h [__USE_MISC] (MAP_SYNC):
Likewise.

ChangeLog
sysdeps/unix/sysv/linux/aarch64/bits/mman.h
sysdeps/unix/sysv/linux/arm/bits/mman.h
sysdeps/unix/sysv/linux/ia64/bits/mman.h
sysdeps/unix/sysv/linux/m68k/bits/mman.h
sysdeps/unix/sysv/linux/microblaze/bits/mman.h
sysdeps/unix/sysv/linux/nios2/bits/mman.h
sysdeps/unix/sysv/linux/riscv/bits/mman.h
sysdeps/unix/sysv/linux/s390/bits/mman.h
sysdeps/unix/sysv/linux/sh/bits/mman.h
sysdeps/unix/sysv/linux/x86/bits/mman.h

index 115d3cbe0341049362556871bc8544b16b894864..0022ea0450b85baad1b4a63dd378725850247703 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,26 @@
 2018-02-06  Joseph Myers  <joseph@codesourcery.com>
 
+       * sysdeps/unix/sysv/linux/aarch64/bits/mman.h [__USE_MISC]
+       (MAP_SYNC): New macro.
+       * sysdeps/unix/sysv/linux/arm/bits/mman.h [__USE_MISC] (MAP_SYNC):
+       Likewise.
+       * sysdeps/unix/sysv/linux/ia64/bits/mman.h [__USE_MISC]
+       (MAP_SYNC): Likewise.
+       * sysdeps/unix/sysv/linux/m68k/bits/mman.h [__USE_MISC]
+       (MAP_SYNC): Likewise.
+       * sysdeps/unix/sysv/linux/microblaze/bits/mman.h [__USE_MISC]
+       (MAP_SYNC): Likewise.
+       * sysdeps/unix/sysv/linux/nios2/bits/mman.h [__USE_MISC]
+       (MAP_SYNC): Likewise.
+       * sysdeps/unix/sysv/linux/riscv/bits/mman.h [__USE_MISC]
+       (MAP_SYNC): Likewise.
+       * sysdeps/unix/sysv/linux/s390/bits/mman.h [__USE_MISC]
+       (MAP_SYNC): Likewise.
+       * sysdeps/unix/sysv/linux/sh/bits/mman.h [__USE_MISC] (MAP_SYNC):
+       Likewise.
+       * sysdeps/unix/sysv/linux/x86/bits/mman.h [__USE_MISC] (MAP_SYNC):
+       Likewise.
+
        * sysdeps/unix/sysv/linux/bits/mman-linux.h [__USE_MISC]
        (MAP_SHARED_VALIDATE): New macro.
        * sysdeps/unix/sysv/linux/hppa/bits/mman.h [__USE_MISC]
index 83ff48cddaf0af26dd3461a58ed2ae12048238cf..9ad8a601f9a43fce54f58b12d57c82f4af394098 100644 (file)
@@ -36,6 +36,8 @@
 # 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.  */
+# define MAP_SYNC      0x80000         /* Perform synchronous page
+                                          faults for the mapping.  */
 #endif
 
 
index 9e059e6d06bb0cb9a7b9c22bf628b28806ab5d27..be71c82e16f60f0533aeb3616f53d7a4f6a3209c 100644 (file)
@@ -34,6 +34,8 @@
 # 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.  */
+# define MAP_SYNC      0x80000         /* Perform synchronous page
+                                          faults for the mapping.  */
 #endif
 
 /* Include generic Linux declarations.  */
index cb64de4dd78ce3e7c08d9b6ab5078aff11c46fa2..0f00a1a342765e4b0f8719ff7905762e3166844e 100644 (file)
@@ -35,6 +35,8 @@
 # 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.  */
+# define MAP_SYNC        0x80000       /* Perform synchronous page
+                                          faults for the mapping.  */
 #endif
 
 /* Include generic Linux declarations.  */
index db26a449113ce8ab5792b7f278183da552f79900..80cc2a677dcf0fffe327100f75d1a430a9236676 100644 (file)
@@ -34,6 +34,8 @@
 # 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.  */
+# define MAP_SYNC      0x80000         /* Perform synchronous page
+                                          faults for the mapping.  */
 #endif
 
 /* Include generic Linux declarations.  */
index b820da1b92a352f8ceed5cd5aa85e20d98d28837..8ca77b6b8fbf23abe7b5463d771b57f1eb77b84c 100644 (file)
@@ -36,6 +36,8 @@
 # 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.  */
+# define MAP_SYNC           0x80000    /* Perform synchronous page
+                                          faults for the mapping.  */
 #endif
 
 /* Include generic Linux declarations.  */
index b7c27b8713b8099094b3211a61c322ffe197ff86..987e47951c39e6e72e282b2ae009359f2064abf4 100644 (file)
@@ -36,6 +36,8 @@
 # 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.  */
+# define MAP_SYNC      0x80000         /* Perform synchronous page
+                                          faults for the mapping.  */
 #endif
 
 /* Include generic Linux declarations.  */
index 0e64f1eea7396df2d917e4f5eb2eceb766426efd..84257723b40211f972eb774e629d938faa8e1167 100644 (file)
@@ -30,6 +30,8 @@
 # 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.  */
+# define MAP_SYNC      0x80000         /* Perform synchronous page
+                                          faults for the mapping.  */
 #endif
 
 /* Include generic Linux declarations.  */
index 4b926e8cd775cebb644d60e5c576ae8d9ebc8cd4..cdd7a635309d11ed3d8fe5a5b41c88a31670e654 100644 (file)
@@ -35,6 +35,8 @@
 # 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.  */
+# define MAP_SYNC      0x80000         /* Perform synchronous page
+                                          faults for the mapping.  */
 #endif
 
 /* Include generic Linux declarations.  */
index c5844dcc8043065885267329636cc907ec8b1e43..e22be1068234e5fd01b4e581d70ec84690b2a508 100644 (file)
@@ -34,6 +34,8 @@
 # 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.  */
+# define MAP_SYNC      0x80000         /* Perform synchronous page
+                                          faults for the mapping.  */
 #endif
 
 /* Include generic Linux declarations.  */
index fb4737a3a76fccc16f22206b2f4cecb828c9148d..ebfc0c7bd1ab232cc469c15f1d766c6ea10dbba6 100644 (file)
@@ -39,6 +39,8 @@
 # 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.  */
+# define MAP_SYNC      0x80000         /* Perform synchronous page
+                                          faults for the mapping.  */
 #endif
 
 /* Include generic Linux declarations.  */