mirror of
git://git.musl-libc.org/musl
synced 2024-12-17 12:14:42 +00:00
add MCL_ONFAULT and MLOCK_ONFAULT mlockall and mlock2 flags
they lock faulted pages into memory (useful when a small part of a large mapped file needs efficient access), new in linux v4.4, commit b0f205c2a3082dd9081f9a94e50658c5fa906ff1 MLOCK_* is not in the POSIX reserved namespace for sys/mman.h
This commit is contained in:
parent
51d5f139ca
commit
789ff6a9f8
@ -36,6 +36,7 @@
|
||||
|
||||
#define MCL_CURRENT 1
|
||||
#define MCL_FUTURE 2
|
||||
#define MCL_ONFAULT 4
|
||||
|
||||
#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
|
||||
#define MADV_NORMAL 0
|
||||
|
@ -37,6 +37,7 @@
|
||||
|
||||
#define MCL_CURRENT 1
|
||||
#define MCL_FUTURE 2
|
||||
#define MCL_ONFAULT 4
|
||||
|
||||
#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
|
||||
#define MADV_NORMAL 0
|
||||
|
@ -38,6 +38,7 @@
|
||||
|
||||
#define MCL_CURRENT 1
|
||||
#define MCL_FUTURE 2
|
||||
#define MCL_ONFAULT 4
|
||||
|
||||
#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
|
||||
#define MADV_NORMAL 0
|
||||
|
@ -37,6 +37,7 @@
|
||||
|
||||
#define MCL_CURRENT 1
|
||||
#define MCL_FUTURE 2
|
||||
#define MCL_ONFAULT 4
|
||||
|
||||
#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
|
||||
#define MADV_NORMAL 0
|
||||
|
@ -37,6 +37,7 @@
|
||||
|
||||
#define MCL_CURRENT 1
|
||||
#define MCL_FUTURE 2
|
||||
#define MCL_ONFAULT 4
|
||||
|
||||
#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
|
||||
#define MADV_NORMAL 0
|
||||
|
@ -37,6 +37,7 @@
|
||||
|
||||
#define MCL_CURRENT 1
|
||||
#define MCL_FUTURE 2
|
||||
#define MCL_ONFAULT 4
|
||||
|
||||
#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
|
||||
#define MADV_NORMAL 0
|
||||
|
@ -38,6 +38,7 @@
|
||||
|
||||
#define MCL_CURRENT 0x2000
|
||||
#define MCL_FUTURE 0x4000
|
||||
#define MCL_ONFAULT 0x8000
|
||||
|
||||
#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
|
||||
#define MADV_NORMAL 0
|
||||
|
@ -38,6 +38,7 @@
|
||||
|
||||
#define MCL_CURRENT 1
|
||||
#define MCL_FUTURE 2
|
||||
#define MCL_ONFAULT 4
|
||||
|
||||
#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
|
||||
#define MADV_NORMAL 0
|
||||
|
@ -38,6 +38,7 @@
|
||||
|
||||
#define MCL_CURRENT 1
|
||||
#define MCL_FUTURE 2
|
||||
#define MCL_ONFAULT 4
|
||||
|
||||
#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
|
||||
#define MADV_NORMAL 0
|
||||
|
@ -38,6 +38,7 @@
|
||||
|
||||
#define MCL_CURRENT 1
|
||||
#define MCL_FUTURE 2
|
||||
#define MCL_ONFAULT 4
|
||||
|
||||
#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
|
||||
#define MADV_NORMAL 0
|
||||
|
@ -39,6 +39,7 @@ int remap_file_pages (void *, size_t, int, size_t, int);
|
||||
#endif
|
||||
|
||||
#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
|
||||
#define MLOCK_ONFAULT 0x01
|
||||
int madvise (void *, size_t, int);
|
||||
int mincore (void *, size_t, unsigned char *);
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user