diff options
Diffstat (limited to '')
-rw-r--r-- | libc-top-half/musl/src/linux/mlock2.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/libc-top-half/musl/src/linux/mlock2.c b/libc-top-half/musl/src/linux/mlock2.c new file mode 100644 index 0000000..1013274 --- /dev/null +++ b/libc-top-half/musl/src/linux/mlock2.c @@ -0,0 +1,10 @@ +#define _GNU_SOURCE 1 +#include <sys/mman.h> +#include "syscall.h" + +int mlock2(const void *addr, size_t len, unsigned flags) +{ + if (flags == 0) + return mlock(addr, len); + return syscall(SYS_mlock2, addr, len, flags); +} |