]>
Commit | Line | Data |
---|---|---|
48ef8ba0 BB |
1 | dnl # |
2 | dnl # 3.17 API change, | |
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. | |
10 | dnl # | |
93ce2b4c | 11 | AC_DEFUN([ZFS_AC_KERNEL_WAIT_ON_BIT], [ |
48ef8ba0 | 12 | AC_MSG_CHECKING([whether wait_on_bit() takes an action]) |
93ce2b4c | 13 | ZFS_LINUX_TRY_COMPILE([ |
48ef8ba0 BB |
14 | #include <linux/wait.h> |
15 | ],[ | |
16 | int (*action)(void *) = NULL; | |
17 | wait_on_bit(NULL, 0, action, 0); | |
18 | ],[ | |
19 | AC_MSG_RESULT(yes) | |
20 | AC_DEFINE(HAVE_WAIT_ON_BIT_ACTION, 1, [yes]) | |
21 | ],[ | |
22 | AC_MSG_RESULT(no) | |
23 | ]) | |
24 | ]) | |
25 | dnl # | |
26 | dnl # 4.13 API change | |
27 | dnl # Renamed struct wait_queue -> struct wait_queue_entry. | |
28 | dnl # | |
93ce2b4c | 29 | AC_DEFUN([ZFS_AC_KERNEL_WAIT_QUEUE_ENTRY_T], [ |
48ef8ba0 | 30 | AC_MSG_CHECKING([whether wait_queue_entry_t exists]) |
93ce2b4c | 31 | ZFS_LINUX_TRY_COMPILE([ |
48ef8ba0 BB |
32 | #include <linux/wait.h> |
33 | ],[ | |
34 | wait_queue_entry_t *entry __attribute__ ((unused)); | |
35 | ],[ | |
36 | AC_MSG_RESULT(yes) | |
37 | AC_DEFINE(HAVE_WAIT_QUEUE_ENTRY_T, 1, | |
38 | [wait_queue_entry_t exists]) | |
39 | ],[ | |
40 | AC_MSG_RESULT(no) | |
41 | ]) | |
42 | ]) | |
43 | ||
44 | dnl # | |
45 | dnl # 4.13 API change | |
46 | dnl # Renamed wait_queue_head::task_list -> wait_queue_head::head | |
47 | dnl # Renamed wait_queue_entry::task_list -> wait_queue_entry::entry | |
48 | dnl # | |
93ce2b4c | 49 | AC_DEFUN([ZFS_AC_KERNEL_WAIT_QUEUE_HEAD_ENTRY], [ |
48ef8ba0 | 50 | AC_MSG_CHECKING([whether wq_head->head and wq_entry->entry exist]) |
93ce2b4c | 51 | ZFS_LINUX_TRY_COMPILE([ |
48ef8ba0 BB |
52 | #include <linux/wait.h> |
53 | ||
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; | |
57 | #else | |
58 | typedef wait_queue_head_t spl_wait_queue_head_t; | |
59 | typedef wait_queue_t spl_wait_queue_entry_t; | |
60 | #endif | |
61 | ],[ | |
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)); | |
66 | ||
67 | head = &wq_head.head; | |
68 | entry = &wq_entry.entry; | |
69 | ],[ | |
70 | AC_MSG_RESULT(yes) | |
71 | AC_DEFINE(HAVE_WAIT_QUEUE_HEAD_ENTRY, 1, | |
72 | [wq_head->head and wq_entry->entry exist]) | |
73 | ],[ | |
74 | AC_MSG_RESULT(no) | |
75 | ]) | |
76 | ]) |