3 dnl # wait_on_bit() no longer requires an action argument. The former
4 dnl # "wait_on_bit" interface required an 'action' function to be provided
5 dnl # which does the actual waiting. There were over 20 such functions in the
6 dnl # kernel, many of them identical, though most cases can be satisfied by one
7 dnl # of just two functions: one which uses io_schedule() and one which just
8 dnl # uses schedule(). This API change was made to consolidate all of those
9 dnl # redundant wait functions.
11 AC_DEFUN([ZFS_AC_KERNEL_WAIT_ON_BIT], [
12 AC_MSG_CHECKING([whether wait_on_bit() takes an action])
13 ZFS_LINUX_TRY_COMPILE([
14 #include <linux/wait.h>
16 int (*action)(void *) = NULL;
17 wait_on_bit(NULL, 0, action, 0);
20 AC_DEFINE(HAVE_WAIT_ON_BIT_ACTION, 1, [yes])
27 dnl # Renamed struct wait_queue -> struct wait_queue_entry.
29 AC_DEFUN([ZFS_AC_KERNEL_WAIT_QUEUE_ENTRY_T], [
30 AC_MSG_CHECKING([whether wait_queue_entry_t exists])
31 ZFS_LINUX_TRY_COMPILE([
32 #include <linux/wait.h>
34 wait_queue_entry_t *entry __attribute__ ((unused));
37 AC_DEFINE(HAVE_WAIT_QUEUE_ENTRY_T, 1,
38 [wait_queue_entry_t exists])
46 dnl # Renamed wait_queue_head::task_list -> wait_queue_head::head
47 dnl # Renamed wait_queue_entry::task_list -> wait_queue_entry::entry
49 AC_DEFUN([ZFS_AC_KERNEL_WAIT_QUEUE_HEAD_ENTRY], [
50 AC_MSG_CHECKING([whether wq_head->head and wq_entry->entry exist])
51 ZFS_LINUX_TRY_COMPILE([
52 #include <linux/wait.h>
54 #ifdef HAVE_WAIT_QUEUE_ENTRY_T
55 typedef wait_queue_head_t spl_wait_queue_head_t;
56 typedef wait_queue_entry_t spl_wait_queue_entry_t;
58 typedef wait_queue_head_t spl_wait_queue_head_t;
59 typedef wait_queue_t spl_wait_queue_entry_t;
62 spl_wait_queue_head_t wq_head;
63 spl_wait_queue_entry_t wq_entry;
64 struct list_head *head __attribute__ ((unused));
65 struct list_head *entry __attribute__ ((unused));
68 entry = &wq_entry.entry;
71 AC_DEFINE(HAVE_WAIT_QUEUE_HEAD_ENTRY, 1,
72 [wq_head->head and wq_entry->entry exist])