]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Add MADV_POPULATE_READ and MADV_POPULATE_WRITE from Linux 5.14 to bits/mman-linux.h
authorJoseph Myers <joseph@codesourcery.com>
Tue, 14 Sep 2021 14:19:24 +0000 (14:19 +0000)
committerJoseph Myers <joseph@codesourcery.com>
Tue, 14 Sep 2021 14:19:24 +0000 (14:19 +0000)
Linux 5.14 adds constants MADV_POPULATE_READ and MADV_POPULATE_WRITE
(with the same values on all architectures).  Add these to glibc's
bits/mman-linux.h.

Tested for x86_64.

sysdeps/unix/sysv/linux/bits/mman-linux.h

index 3b1ae418e073c1220257cc3e2c1f2f5a9be6d047..31451c28d93f9f72bf8d615ed1bb6bc46d179701 100644 (file)
 # define MADV_KEEPONFORK  19   /* Undo MADV_WIPEONFORK.  */
 # define MADV_COLD        20   /* Deactivate these pages.  */
 # define MADV_PAGEOUT     21   /* Reclaim these pages.  */
+# define MADV_POPULATE_READ 22 /* Populate (prefault) page tables
+                                  readable.  */
+# define MADV_POPULATE_WRITE 23        /* Populate (prefault) page tables
+                                  writable.  */
 # define MADV_HWPOISON   100   /* Poison a page for testing.  */
 #endif