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