1 AC_DEFUN([ZFS_AC_KERNEL_KTHREAD_COMPLETE_AND_EXIT], [
4 dnl # cead18552660702a4a46f58e65188fe5f36e9dfe ("exit: Rename complete_and_exit to kthread_complete_and_exit")
6 dnl # Also moves the definition from include/linux/kernel.h to include/linux/kthread.h
8 AC_MSG_CHECKING([whether kthread_complete_and_exit() is available])
9 ZFS_LINUX_TEST_RESULT([kthread_complete_and_exit], [
11 AC_DEFINE(SPL_KTHREAD_COMPLETE_AND_EXIT, kthread_complete_and_exit, [kthread_complete_and_exit() available])
14 AC_DEFINE(SPL_KTHREAD_COMPLETE_AND_EXIT, complete_and_exit, [using complete_and_exit() instead])
18 AC_DEFUN([ZFS_AC_KERNEL_KTHREAD_DEQUEUE_SIGNAL_4ARG], [
20 dnl # 5.17 API: enum pid_type * as new 4th dequeue_signal() argument,
21 dnl # 5768d8906bc23d512b1a736c1e198aa833a6daa4 ("signal: Requeue signals in the appropriate queue")
23 dnl # int dequeue_signal(struct task_struct *task, sigset_t *mask, kernel_siginfo_t *info);
24 dnl # int dequeue_signal(struct task_struct *task, sigset_t *mask, kernel_siginfo_t *info, enum pid_type *type);
26 AC_MSG_CHECKING([whether dequeue_signal() takes 4 arguments])
27 ZFS_LINUX_TEST_RESULT([kthread_dequeue_signal], [
29 AC_DEFINE(HAVE_DEQUEUE_SIGNAL_4ARG, 1, [dequeue_signal() takes 4 arguments])
35 AC_DEFUN([ZFS_AC_KERNEL_SRC_KTHREAD_COMPLETE_AND_EXIT], [
36 ZFS_LINUX_TEST_SRC([kthread_complete_and_exit], [
37 #include <linux/kthread.h>
39 struct completion *completion = NULL;
42 kthread_complete_and_exit(completion, code);
46 AC_DEFUN([ZFS_AC_KERNEL_SRC_KTHREAD_DEQUEUE_SIGNAL_4ARG], [
47 ZFS_LINUX_TEST_SRC([kthread_dequeue_signal], [
48 #include <linux/sched/signal.h>
50 struct task_struct *task = NULL;
51 sigset_t *mask = NULL;
52 kernel_siginfo_t *info = NULL;
53 enum pid_type *type = NULL;
54 int error __attribute__ ((unused));
56 error = dequeue_signal(task, mask, info, type);
60 AC_DEFUN([ZFS_AC_KERNEL_KTHREAD], [
61 ZFS_AC_KERNEL_KTHREAD_COMPLETE_AND_EXIT
62 ZFS_AC_KERNEL_KTHREAD_DEQUEUE_SIGNAL_4ARG
65 AC_DEFUN([ZFS_AC_KERNEL_SRC_KTHREAD], [
66 ZFS_AC_KERNEL_SRC_KTHREAD_COMPLETE_AND_EXIT
67 ZFS_AC_KERNEL_SRC_KTHREAD_DEQUEUE_SIGNAL_4ARG