mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-03-03 07:29:23 +00:00
Linux add definition for madvise flag (#883)
This commit is contained in:
parent
b21842ed7a
commit
8596e83cce
11 changed files with 36 additions and 0 deletions
|
@ -263,10 +263,19 @@ syscon madv MADV_FREE 8 8 5 5 5 6 6 8 # Linux 4.5+ (c. 2016)
|
|||
syscon madv MADV_HUGEPAGE 14 14 127 127 127 127 127 127 # TODO(jart): why would we need it?
|
||||
syscon madv MADV_NOHUGEPAGE 15 15 127 127 127 127 127 127 # TODO(jart): why would we need it?
|
||||
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_PAGEOUT 21 21 127 127 127 127 127 127 # TODO: add support ?
|
||||
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?
|
||||
syscon madv MADV_HWPOISON 100 100 127 127 127 127 127 127 # TODO(jart): what is it?
|
||||
syscon madv MADV_SOFT_OFFLINE 101 101 127 127 127 127 127 127 # TODO: add support ?
|
||||
syscon madv MADV_REMOVE 9 9 127 127 127 127 127 127 # TODO(jart): what is it?
|
||||
syscon fadv POSIX_FADV_NOREUSE 5 5 127 127 5 127 5 127 # wut
|
||||
|
||||
|
|
2
libc/sysv/consts/MADV_COLD.S
Normal file
2
libc/sysv/consts/MADV_COLD.S
Normal file
|
@ -0,0 +1,2 @@
|
|||
#include "libc/sysv/consts/syscon.internal.h"
|
||||
.syscon madv,MADV_COLD,20,20,127,127,127,127,127,127
|
2
libc/sysv/consts/MADV_COLLAPSE.S
Normal file
2
libc/sysv/consts/MADV_COLLAPSE.S
Normal file
|
@ -0,0 +1,2 @@
|
|||
#include "libc/sysv/consts/syscon.internal.h"
|
||||
.syscon madv,MADV_COLLAPSE,25,25,127,127,127,127,127,127
|
2
libc/sysv/consts/MADV_DONTNEED_LOCKED.S
Normal file
2
libc/sysv/consts/MADV_DONTNEED_LOCKED.S
Normal file
|
@ -0,0 +1,2 @@
|
|||
#include "libc/sysv/consts/syscon.internal.h"
|
||||
.syscon madv,MADV_DONTNEED_LOCKED,24,24,127,127,127,127,127,127
|
2
libc/sysv/consts/MADV_KEEPONFORK.S
Normal file
2
libc/sysv/consts/MADV_KEEPONFORK.S
Normal file
|
@ -0,0 +1,2 @@
|
|||
#include "libc/sysv/consts/syscon.internal.h"
|
||||
.syscon madv,MADV_KEEPONFORK,19,19,127,127,127,127,127,127
|
2
libc/sysv/consts/MADV_PAGEOUT.S
Normal file
2
libc/sysv/consts/MADV_PAGEOUT.S
Normal file
|
@ -0,0 +1,2 @@
|
|||
#include "libc/sysv/consts/syscon.internal.h"
|
||||
.syscon madv,MADV_PAGEOUT,21,21,127,127,127,127,127,127
|
2
libc/sysv/consts/MADV_POPULATE_READ.S
Normal file
2
libc/sysv/consts/MADV_POPULATE_READ.S
Normal file
|
@ -0,0 +1,2 @@
|
|||
#include "libc/sysv/consts/syscon.internal.h"
|
||||
.syscon madv,MADV_POPULATE_READ,22,22,127,127,127,127,127,127
|
2
libc/sysv/consts/MADV_POPULATE_WRITE.S
Normal file
2
libc/sysv/consts/MADV_POPULATE_WRITE.S
Normal file
|
@ -0,0 +1,2 @@
|
|||
#include "libc/sysv/consts/syscon.internal.h"
|
||||
.syscon madv,MADV_POPULATE_WRITE,23,23,127,127,127,127,127,127
|
2
libc/sysv/consts/MADV_SOFT_OFFLINE.S
Normal file
2
libc/sysv/consts/MADV_SOFT_OFFLINE.S
Normal file
|
@ -0,0 +1,2 @@
|
|||
#include "libc/sysv/consts/syscon.internal.h"
|
||||
.syscon madv,MADV_SOFT_OFFLINE,101,101,127,127,127,127,127,127
|
2
libc/sysv/consts/MADV_WIPEONFORK.S
Normal file
2
libc/sysv/consts/MADV_WIPEONFORK.S
Normal file
|
@ -0,0 +1,2 @@
|
|||
#include "libc/sysv/consts/syscon.internal.h"
|
||||
.syscon madv,MADV_WIPEONFORK,18,18,127,127,127,127,127,127
|
|
@ -19,6 +19,15 @@ extern const unsigned MADV_REMOVE;
|
|||
extern const unsigned MADV_SEQUENTIAL;
|
||||
extern const unsigned MADV_UNMERGEABLE;
|
||||
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;
|
||||
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
|
||||
|
|
Loading…
Add table
Reference in a new issue