From 0a539adc5006da99d189ee34a7d54c04df900d3f Mon Sep 17 00:00:00 2001 From: Michal Biesek Date: Fri, 11 Aug 2023 23:22:00 +0200 Subject: [PATCH] Add `MADV_PAGEOUT` definition from linux v5.4 see linux commit 1a4e58cce84ee88129d5d49c064bd2852b481357 mm: introduce MADV_PAGEOUT --- libc/sysv/consts.sh | 1 + libc/sysv/consts/MADV_PAGEOUT.S | 2 ++ libc/sysv/consts/madv.h | 1 + 3 files changed, 4 insertions(+) create mode 100644 libc/sysv/consts/MADV_PAGEOUT.S diff --git a/libc/sysv/consts.sh b/libc/sysv/consts.sh index 522663ea0..256111c8d 100755 --- a/libc/sysv/consts.sh +++ b/libc/sysv/consts.sh @@ -268,6 +268,7 @@ syscon madv MADV_DODUMP 17 17 127 127 127 127 127 127 # TODO( syscon madv MADV_WIPEONFORK 18 18 127 127 127 127 127 127 # TODO: add support ? syscon madv MADV_KEEPONFORK 19 19 127 127 127 127 127 127 # TODO: add support ? syscon madv MADV_COLD 20 20 127 127 127 127 127 127 # TODO: add support ? +syscon madv MADV_PAGEOUT 21 21 127 127 127 127 127 127 # TODO: add support ? syscon madv MADV_DOFORK 11 11 127 127 127 127 127 127 # TODO(jart): what is it? syscon madv MADV_DONTDUMP 16 16 127 127 127 127 127 127 # see MAP_CONCEAL in OpenBSD; TODO(jart): what is it? syscon madv MADV_DONTFORK 10 10 127 127 127 127 127 127 # TODO(jart): what is it? diff --git a/libc/sysv/consts/MADV_PAGEOUT.S b/libc/sysv/consts/MADV_PAGEOUT.S new file mode 100644 index 000000000..a3b0e06ab --- /dev/null +++ b/libc/sysv/consts/MADV_PAGEOUT.S @@ -0,0 +1,2 @@ +#include "libc/sysv/consts/syscon.internal.h" +.syscon madv,MADV_PAGEOUT,21,21,127,127,127,127,127,127 diff --git a/libc/sysv/consts/madv.h b/libc/sysv/consts/madv.h index 97c4839b3..a1d083bf4 100644 --- a/libc/sysv/consts/madv.h +++ b/libc/sysv/consts/madv.h @@ -23,6 +23,7 @@ extern const unsigned MADV_SOFT_OFFLINE; extern const unsigned MADV_WIPEONFORK; extern const unsigned MADV_KEEPONFORK; extern const unsigned MADV_COLD; +extern const unsigned MADV_PAGEOUT; #define MADV_NORMAL 0 #define MADV_RANDOM 1