Linux: Suppress -Wordered-compare-function-pointers in tracepoint code
[zfs.git] / config / kernel-sched.m4
blob17e49fbdf472129f1ebb0f8e955554e4e8f907d2
1 dnl #
2 dnl # 3.9 API change,
3 dnl # Moved things from linux/sched.h to linux/sched/rt.h
4 dnl #
5 AC_DEFUN([ZFS_AC_KERNEL_SRC_SCHED_RT_HEADER], [
6         ZFS_LINUX_TEST_SRC([sched_rt_header], [
7                 #include <linux/sched.h>
8                 #include <linux/sched/rt.h>
9         ],[
10                 return 0;
11         ])
14 AC_DEFUN([ZFS_AC_KERNEL_SCHED_RT_HEADER], [
15         AC_MSG_CHECKING([whether header linux/sched/rt.h exists])
16         ZFS_LINUX_TEST_RESULT([sched_rt_header], [
17                 AC_MSG_RESULT(yes)
18         ],[
19                 ZFS_LINUX_TEST_ERROR([sched_rt_header])
20         ])
23 dnl #
24 dnl # 4.11 API change,
25 dnl # Moved things from linux/sched.h to linux/sched/signal.h
26 dnl #
27 AC_DEFUN([ZFS_AC_KERNEL_SRC_SCHED_SIGNAL_HEADER], [
28         ZFS_LINUX_TEST_SRC([sched_signal_header], [
29                 #include <linux/sched.h>
30                 #include <linux/sched/signal.h>
31         ],[
32                 return 0;
33         ])
36 AC_DEFUN([ZFS_AC_KERNEL_SCHED_SIGNAL_HEADER], [
37         AC_MSG_CHECKING([whether header linux/sched/signal.h exists])
38         ZFS_LINUX_TEST_RESULT([sched_signal_header], [
39                 AC_DEFINE(HAVE_SCHED_SIGNAL_HEADER, 1,
40                     [linux/sched/signal.h exists])
41                 AC_MSG_RESULT(yes)
42         ],[
43                 AC_MSG_RESULT(no)
44         ])
47 dnl #
48 dnl # 3.19 API change
49 dnl # The io_schedule_timeout() function is present in all 2.6.32 kernels
50 dnl # but it was not exported until Linux 3.19.  The RHEL 7.x kernels which
51 dnl # are based on a 3.10 kernel do export this symbol.
52 dnl #
53 AC_DEFUN([ZFS_AC_KERNEL_SRC_IO_SCHEDULE_TIMEOUT], [
54         ZFS_LINUX_TEST_SRC([io_schedule_timeout], [
55                 #include <linux/sched.h>
56         ], [
57                 (void) io_schedule_timeout(1);
58         ])
61 AC_DEFUN([ZFS_AC_KERNEL_IO_SCHEDULE_TIMEOUT], [
62         AC_MSG_CHECKING([whether io_schedule_timeout() is available])
63         ZFS_LINUX_TEST_RESULT_SYMBOL([io_schedule_timeout],
64         [io_schedule_timeout], [], [
65                 AC_MSG_RESULT(yes)
66                 AC_DEFINE(HAVE_IO_SCHEDULE_TIMEOUT, 1, [yes])
67         ],[
68                 AC_MSG_RESULT(no)
69         ])
72 AC_DEFUN([ZFS_AC_KERNEL_SRC_SCHED], [
73         ZFS_AC_KERNEL_SRC_SCHED_RT_HEADER
74         ZFS_AC_KERNEL_SRC_SCHED_SIGNAL_HEADER
75         ZFS_AC_KERNEL_SRC_IO_SCHEDULE_TIMEOUT
78 AC_DEFUN([ZFS_AC_KERNEL_SCHED], [
79         ZFS_AC_KERNEL_SCHED_RT_HEADER
80         ZFS_AC_KERNEL_SCHED_SIGNAL_HEADER
81         ZFS_AC_KERNEL_IO_SCHEDULE_TIMEOUT