1 // SPDX-License-Identifier: GPL-2.0-or-later
2 /*
3 * Copyright (c) 2019 SUSE LLC
4 * Author: Christian Amann <camann@suse.com>
5 */
6
7 #ifndef PIDFD_SEND_SIGNAL_H
8 #define PIDFD_SEND_SIGNAL_H
9
10 #include "tst_test.h"
11 #include "lapi/syscalls.h"
12
check_syscall_support(void)13 static void check_syscall_support(void)
14 {
15 /* allow the tests to fail early */
16 tst_syscall(__NR_pidfd_send_signal);
17 }
18
19 #ifndef HAVE_PIDFD_SEND_SIGNAL
pidfd_send_signal(int pidfd,int sig,siginfo_t * info,unsigned int flags)20 static int pidfd_send_signal(int pidfd, int sig, siginfo_t *info,
21 unsigned int flags)
22 {
23 tst_res(TINFO, "Testing syscall(__NR_pidfd_send_signal)");
24 return tst_syscall(__NR_pidfd_send_signal, pidfd, sig, info, flags);
25 }
26 #endif /* HAVE_PIDFD_SEND_SIGNAL */
27
28 #endif /* PIDFD_SEND_SIGNAL_H */
29