projects
/
cascardo
/
linux.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
b9c6d9fe372f65e7e00d31a7169b8f5dc24f80f8
[cascardo/linux.git]
/
tools
/
testing
/
selftests
/
vm
/
mlock2.h
1
#include <syscall.h>
2
#include <errno.h>
3
4
#ifndef MLOCK_ONFAULT
5
#define MLOCK_ONFAULT 1
6
#endif
7
8
#ifndef MCL_ONFAULT
9
#define MCL_ONFAULT (MCL_FUTURE << 1)
10
#endif
11
12
static int mlock2_(void *start, size_t len, int flags)
13
{
14
#ifdef __NR_mlock2
15
return syscall(__NR_mlock2, start, len, flags);
16
#else
17
errno = ENOSYS;
18
return -1;
19
#endif
20
}