diff options
author | Manuel Bentele | 2020-10-23 15:18:01 +0200 |
---|---|---|
committer | Manuel Bentele | 2020-10-23 15:18:01 +0200 |
commit | dbb41ce2b7f309d394054a6bd1e33afd578798a5 (patch) | |
tree | 6a31092063d9f2fb5ac5720ec6759040e793c3d5 /src/kernel/tests/include/lapi/pidfd_send_signal.h | |
parent | Set Linux kernel version to unknown if it is not detectable (diff) | |
download | xloop-dbb41ce2b7f309d394054a6bd1e33afd578798a5.tar.gz xloop-dbb41ce2b7f309d394054a6bd1e33afd578798a5.tar.xz xloop-dbb41ce2b7f309d394054a6bd1e33afd578798a5.zip |
Move the source code of all xloop components to the common 'src' directory
Diffstat (limited to 'src/kernel/tests/include/lapi/pidfd_send_signal.h')
-rw-r--r-- | src/kernel/tests/include/lapi/pidfd_send_signal.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/kernel/tests/include/lapi/pidfd_send_signal.h b/src/kernel/tests/include/lapi/pidfd_send_signal.h new file mode 100644 index 0000000..8352d2a --- /dev/null +++ b/src/kernel/tests/include/lapi/pidfd_send_signal.h @@ -0,0 +1,27 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +/* + * Copyright (c) 2019 SUSE LLC + * Author: Christian Amann <camann@suse.com> + */ + +#ifndef PIDFD_SEND_SIGNAL_H +#define PIDFD_SEND_SIGNAL_H + +#include "tst_test.h" +#include "lapi/syscalls.h" + +static inline void pidfd_send_signal_supported(void) +{ + /* allow the tests to fail early */ + tst_syscall(__NR_pidfd_send_signal); +} + +#ifndef HAVE_PIDFD_SEND_SIGNAL +static int pidfd_send_signal(int pidfd, int sig, siginfo_t *info, + unsigned int flags) +{ + return tst_syscall(__NR_pidfd_send_signal, pidfd, sig, info, flags); +} +#endif /* HAVE_PIDFD_SEND_SIGNAL */ + +#endif /* PIDFD_SEND_SIGNAL_H */ |