1 /*
2 * Copyright (c) 2015 Cedric Hnyda <chnyda@suse.com>
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License as
6 * published by the Free Software Foundation; either version 2 of
7 * the License, or (at your option) any later version.
8 *
9 * This program is distributed in the hope that it would be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write the Free Software Foundation,
16 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
17 */
18
19 #ifndef KCMP_H
20 #define KCMP_H
21
22 #include <sys/types.h>
23 #include "config.h"
24 #include "lapi/syscalls.h"
25
26 #if !defined(HAVE_ENUM_KCMP_TYPE)
27
28 enum kcmp_type {
29 KCMP_FILE,
30 KCMP_VM,
31 KCMP_FILES,
32 KCMP_FS,
33 KCMP_SIGHAND,
34 KCMP_IO,
35 KCMP_SYSVSEM,
36 KCMP_TYPES,
37 };
38
39 #else
40
41 # include <linux/kcmp.h>
42
43 #endif
44
45 #if !defined(HAVE_KCMP)
46
kcmp(int pid1,int pid2,int type,int fd1,int fd2)47 int kcmp(int pid1, int pid2, int type, int fd1, int fd2)
48 {
49 return tst_syscall(__NR_kcmp, pid1, pid2, type, fd1, fd2);
50 }
51
52 #endif
53
54 #endif /* KCMP_H */
55