diff --git a/libc/sysv/consts.sh b/libc/sysv/consts.sh index 5d84f3089..522663ea0 100755 --- a/libc/sysv/consts.sh +++ b/libc/sysv/consts.sh @@ -267,6 +267,7 @@ syscon madv MADV_NOHUGEPAGE 15 15 127 127 127 127 127 127 # T syscon madv MADV_DODUMP 17 17 127 127 127 127 127 127 # TODO(jart): what is it? 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_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_COLD.S b/libc/sysv/consts/MADV_COLD.S new file mode 100644 index 000000000..8f1064a43 --- /dev/null +++ b/libc/sysv/consts/MADV_COLD.S @@ -0,0 +1,2 @@ +#include "libc/sysv/consts/syscon.internal.h" +.syscon madv,MADV_COLD,20,20,127,127,127,127,127,127 diff --git a/libc/sysv/consts/madv.h b/libc/sysv/consts/madv.h index 2b3653805..97c4839b3 100644 --- a/libc/sysv/consts/madv.h +++ b/libc/sysv/consts/madv.h @@ -22,6 +22,7 @@ extern const unsigned MADV_WILLNEED; extern const unsigned MADV_SOFT_OFFLINE; extern const unsigned MADV_WIPEONFORK; extern const unsigned MADV_KEEPONFORK; +extern const unsigned MADV_COLD; #define MADV_NORMAL 0 #define MADV_RANDOM 1