]> granicus.if.org Git - strace/blob - tests/mlockall.c
641e6b58104d8243554adf31f3a52993fa41b8e1
[strace] / tests / mlockall.c
1 /*
2  * Check decoding of mlockall syscall.
3  *
4  * Copyright (c) 2016 Dmitry V. Levin <ldv@altlinux.org>
5  * All rights reserved.
6  *
7  * SPDX-License-Identifier: GPL-2.0-or-later
8  */
9
10 #include "tests.h"
11
12 #include <stdio.h>
13 #include <sys/mman.h>
14
15 int
16 main(void)
17 {
18         int rc = mlockall(0);
19         printf("mlockall(0) = %s\n", sprintrc(rc));
20
21         rc = mlockall(MCL_CURRENT);
22         printf("mlockall(MCL_CURRENT) = %s\n", sprintrc(rc));
23
24         puts("+++ exited with 0 +++");
25         return 0;
26 }