LibC: Make the madvise advice field a value instead of a bitfield

The advices are almost always exclusive of one another, and while POSIX
does not define madvise, most other unix-like and *BSD systems also only
accept a singular value per call.
This commit is contained in:
Idan Horowitz 2021-10-28 20:57:53 +03:00
commit fc13d0782f
Notes: sideshowbarker 2024-07-17 23:13:56 +09:00
2 changed files with 4 additions and 8 deletions

View file

@ -31,8 +31,8 @@ extern "C" {
#define MAP_FAILED ((void*)-1)
#define MADV_SET_VOLATILE 0x100
#define MADV_SET_NONVOLATILE 0x200
#define MADV_SET_VOLATILE 0x1
#define MADV_SET_NONVOLATILE 0x2
#define MS_SYNC 1
#define MS_ASYNC 2