summaryrefslogtreecommitdiff
path: root/lockme.h
blob: 7cce97bb55330fbe1e755f11865836e25d8ddbe4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#ifndef LOCKME_H
#define LOCKME_H

#include <sys/mman.h>

#include "die.h"

static inline void xlockme(void)
{
	if (mlockall(MCL_CURRENT | MCL_FUTURE) != 0)
		panic("Cannot lock pages!\n");
}

static inline void xunlockme(void)
{
	munlockall();
}

#endif /* LOCKME_H */
Wang Nan <wangnan0@huawei.com>2016-09-12 12:54:31 +0000 committerArnaldo Carvalho de Melo <acme@redhat.com>2016-09-13 16:13:29 -0300 commit0a4a7e435f458e996d0f21a9ebc964e0b0d64eba (patch) tree4783f2125367d16ddadb3514363720b43e3f4c89 parentfbef103fad5009827965b10aedbecb1786904f4d (diff)
perf build: Compare mman.h related headers against kernel originals
As with other cloned headers, compare the newly introduced mman related headers against their source copy in kernel tree. Signed-off-by: Wang Nan <wangnan0@huawei.com> Cc: Zefan Li <lizefan@huawei.com> Cc: pi3orama@163.com Link: http://lkml.kernel.org/r/1473684871-209320-4-git-send-email-wangnan0@huawei.com [ Added -I to ignore the uapi/ difference ] Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat