1f08c3bdfSopenharmony_ci// SPDX-License-Identifier: GPL-2.0-or-later 2f08c3bdfSopenharmony_ci/* 3f08c3bdfSopenharmony_ci * Copyright (c) 2020 Linaro Limited. All rights reserved. 4f08c3bdfSopenharmony_ci * Author: Viresh Kumar <viresh.kumar@linaro.org> 5f08c3bdfSopenharmony_ci */ 6f08c3bdfSopenharmony_ci 7f08c3bdfSopenharmony_ci#ifndef LAPI_PIDFD_OPEN_H__ 8f08c3bdfSopenharmony_ci#define LAPI_PIDFD_OPEN_H__ 9f08c3bdfSopenharmony_ci 10f08c3bdfSopenharmony_ci#include <sys/syscall.h> 11f08c3bdfSopenharmony_ci#include <sys/types.h> 12f08c3bdfSopenharmony_ci 13f08c3bdfSopenharmony_ci#include "lapi/syscalls.h" 14f08c3bdfSopenharmony_ci 15f08c3bdfSopenharmony_ci#include "config.h" 16f08c3bdfSopenharmony_ci 17f08c3bdfSopenharmony_ci#ifndef HAVE_PIDFD_OPEN 18f08c3bdfSopenharmony_cistatic inline int pidfd_open(pid_t pid, unsigned int flags) 19f08c3bdfSopenharmony_ci{ 20f08c3bdfSopenharmony_ci return tst_syscall(__NR_pidfd_open, pid, flags); 21f08c3bdfSopenharmony_ci} 22f08c3bdfSopenharmony_ci#endif 23f08c3bdfSopenharmony_ci 24f08c3bdfSopenharmony_ci#endif /* LAPI_PIDFD_OPEN_H__ */ 25