diff --git a/libc/sysv/consts.sh b/libc/sysv/consts.sh index cc7972b84..7c811417e 100755 --- a/libc/sysv/consts.sh +++ b/libc/sysv/consts.sh @@ -272,6 +272,7 @@ syscon madv MADV_PAGEOUT 21 21 127 127 127 127 127 127 # TODO syscon madv MADV_POPULATE_READ 22 22 127 127 127 127 127 127 # TODO: add support ? syscon madv MADV_POPULATE_WRITE 23 23 127 127 127 127 127 127 # TODO: add support ? syscon madv MADV_DONTNEED_LOCKED 24 24 127 127 127 127 127 127 # TODO: add support ? +syscon madv MADV_COLLAPSE 25 25 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_COLLAPSE.S b/libc/sysv/consts/MADV_COLLAPSE.S new file mode 100644 index 000000000..c822224ac --- /dev/null +++ b/libc/sysv/consts/MADV_COLLAPSE.S @@ -0,0 +1,2 @@ +#include "libc/sysv/consts/syscon.internal.h" +.syscon madv,MADV_COLLAPSE,25,25,127,127,127,127,127,127 diff --git a/libc/sysv/consts/madv.h b/libc/sysv/consts/madv.h index 59c00f4d1..df2f5b9f8 100644 --- a/libc/sysv/consts/madv.h +++ b/libc/sysv/consts/madv.h @@ -27,6 +27,7 @@ extern const unsigned MADV_PAGEOUT; extern const unsigned MADV_POPULATE_READ; extern const unsigned MADV_POPULATE_WRITE; extern const unsigned MADV_DONTNEED_LOCKED; +extern const unsigned MADV_COLLAPSE; #define MADV_NORMAL 0 #define MADV_RANDOM 1