1f08c3bdfSopenharmony_ci// SPDX-License-Identifier: GPL-2.0-or-later 2f08c3bdfSopenharmony_ci/* 3f08c3bdfSopenharmony_ci * Copyright (c) 2015 Cedric Hnyda <chnyda@suse.com> 4f08c3bdfSopenharmony_ci */ 5f08c3bdfSopenharmony_ci 6f08c3bdfSopenharmony_ci#ifndef LAPI_KCMP_H__ 7f08c3bdfSopenharmony_ci#define LAPI_KCMP_H__ 8f08c3bdfSopenharmony_ci 9f08c3bdfSopenharmony_ci#include <sys/types.h> 10f08c3bdfSopenharmony_ci#include "config.h" 11f08c3bdfSopenharmony_ci#include "lapi/syscalls.h" 12f08c3bdfSopenharmony_ci 13f08c3bdfSopenharmony_ci#ifndef HAVE_ENUM_KCMP_TYPE 14f08c3bdfSopenharmony_ci 15f08c3bdfSopenharmony_cienum kcmp_type { 16f08c3bdfSopenharmony_ci KCMP_FILE, 17f08c3bdfSopenharmony_ci KCMP_VM, 18f08c3bdfSopenharmony_ci KCMP_FILES, 19f08c3bdfSopenharmony_ci KCMP_FS, 20f08c3bdfSopenharmony_ci KCMP_SIGHAND, 21f08c3bdfSopenharmony_ci KCMP_IO, 22f08c3bdfSopenharmony_ci KCMP_SYSVSEM, 23f08c3bdfSopenharmony_ci KCMP_TYPES, 24f08c3bdfSopenharmony_ci}; 25f08c3bdfSopenharmony_ci 26f08c3bdfSopenharmony_ci#else 27f08c3bdfSopenharmony_ci 28f08c3bdfSopenharmony_ci# include <linux/kcmp.h> 29f08c3bdfSopenharmony_ci 30f08c3bdfSopenharmony_ci#endif 31f08c3bdfSopenharmony_ci 32f08c3bdfSopenharmony_ci#ifndef HAVE_KCMP 33f08c3bdfSopenharmony_ci 34f08c3bdfSopenharmony_cistatic inline int kcmp(int pid1, int pid2, int type, int fd1, int fd2) 35f08c3bdfSopenharmony_ci{ 36f08c3bdfSopenharmony_ci return tst_syscall(__NR_kcmp, pid1, pid2, type, fd1, fd2); 37f08c3bdfSopenharmony_ci} 38f08c3bdfSopenharmony_ci 39f08c3bdfSopenharmony_ci#endif 40f08c3bdfSopenharmony_ci 41f08c3bdfSopenharmony_ci#endif /* LAPI_KCMP_H__ */ 42