3 dnl # Renamed struct wait_queue -> struct wait_queue_entry.
5 dnl # N.B. The type check is performed before all other checks
6 dnl # since ZFS_AC_KERNEL_SRC_WAIT_QUEUE_HEAD_ENTRY depends on
7 dnl # HAVE_WAIT_QUEUE_ENTRY_T being set in confdefs.h.
9 AC_DEFUN([ZFS_AC_KERNEL_WAIT_QUEUE_ENTRY_T], [
10 AC_MSG_CHECKING([whether wait_queue_entry_t exists])
11 ZFS_LINUX_TRY_COMPILE([
12 #include <linux/wait.h>
14 wait_queue_entry_t *entry __attribute__ ((unused));
17 AC_DEFINE(HAVE_WAIT_QUEUE_ENTRY_T, 1,
18 [wait_queue_entry_t exists])
25 dnl # 3.17 API change,
26 dnl # wait_on_bit() no longer requires an action argument. The former
27 dnl # "wait_on_bit" interface required an 'action' function to be provided
28 dnl # which does the actual waiting. There were over 20 such functions in the
29 dnl # kernel, many of them identical, though most cases can be satisfied by one
30 dnl # of just two functions: one which uses io_schedule() and one which just
31 dnl # uses schedule(). This API change was made to consolidate all of those
32 dnl # redundant wait functions.
34 AC_DEFUN([ZFS_AC_KERNEL_SRC_WAIT_ON_BIT], [
35 ZFS_LINUX_TEST_SRC([wait_on_bit], [
36 #include <linux/wait.h>
38 int (*action)(void *) = NULL;
39 wait_on_bit(NULL, 0, action, 0);
43 AC_DEFUN([ZFS_AC_KERNEL_WAIT_ON_BIT], [
44 AC_MSG_CHECKING([whether wait_on_bit() takes an action])
45 ZFS_LINUX_TEST_RESULT([wait_on_bit], [
47 AC_DEFINE(HAVE_WAIT_ON_BIT_ACTION, 1, [yes])
55 dnl # Renamed wait_queue_head::task_list -> wait_queue_head::head
56 dnl # Renamed wait_queue_entry::task_list -> wait_queue_entry::entry
58 AC_DEFUN([ZFS_AC_KERNEL_SRC_WAIT_QUEUE_HEAD_ENTRY], [
59 ZFS_LINUX_TEST_SRC([wait_queue_head_entry], [
60 #include <linux/wait.h>
62 #ifdef HAVE_WAIT_QUEUE_ENTRY_T
63 typedef wait_queue_head_t spl_wait_queue_head_t;
64 typedef wait_queue_entry_t spl_wait_queue_entry_t;
66 typedef wait_queue_head_t spl_wait_queue_head_t;
67 typedef wait_queue_t spl_wait_queue_entry_t;
70 spl_wait_queue_head_t wq_head;
71 spl_wait_queue_entry_t wq_entry;
72 struct list_head *head __attribute__ ((unused));
73 struct list_head *entry __attribute__ ((unused));
76 entry = &wq_entry.entry;
80 AC_DEFUN([ZFS_AC_KERNEL_WAIT_QUEUE_HEAD_ENTRY], [
81 AC_MSG_CHECKING([whether wq_head->head and wq_entry->entry exist])
82 ZFS_LINUX_TEST_RESULT([wait_queue_head_entry], [
84 AC_DEFINE(HAVE_WAIT_QUEUE_HEAD_ENTRY, 1,
85 [wq_head->head and wq_entry->entry exist])
91 AC_DEFUN([ZFS_AC_KERNEL_SRC_WAIT], [
92 ZFS_AC_KERNEL_SRC_WAIT_ON_BIT
93 ZFS_AC_KERNEL_SRC_WAIT_QUEUE_HEAD_ENTRY
96 AC_DEFUN([ZFS_AC_KERNEL_WAIT], [
97 ZFS_AC_KERNEL_WAIT_ON_BIT
98 ZFS_AC_KERNEL_WAIT_QUEUE_HEAD_ENTRY