summaryrefslogtreecommitdiffstats
path: root/config/kernel-sched.m4
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2018-02-07 11:50:24 -0800
committerGitHub <[email protected]>2018-02-07 11:50:24 -0800
commit48ef8ba07094afcd67355940ca8db92d76f7c096 (patch)
treec0f847b7ce7c93950d313ca7708bce4bc1f3621e /config/kernel-sched.m4
parent5461eefe50427a8f8caf0b92f0195c754bed8ec6 (diff)
Split spl-build.m4
Split the kernel interface configure checks in to seperate m4 macro files. This is intended to facilitate moving the spl source code in to the zfs repository. Reviewed-by: Tony Hutter <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #682
Diffstat (limited to 'config/kernel-sched.m4')
-rw-r--r--config/kernel-sched.m456
1 files changed, 56 insertions, 0 deletions
diff --git a/config/kernel-sched.m4 b/config/kernel-sched.m4
new file mode 100644
index 000000000..5ae21676e
--- /dev/null
+++ b/config/kernel-sched.m4
@@ -0,0 +1,56 @@
+dnl #
+dnl # 3.9 API change,
+dnl # Moved things from linux/sched.h to linux/sched/rt.h
+dnl #
+AC_DEFUN([SPL_AC_SCHED_RT_HEADER],
+ [AC_MSG_CHECKING([whether header linux/sched/rt.h exists])
+ SPL_LINUX_TRY_COMPILE([
+ #include <linux/sched.h>
+ #include <linux/sched/rt.h>
+ ],[
+ return 0;
+ ],[
+ AC_DEFINE(HAVE_SCHED_RT_HEADER, 1, [linux/sched/rt.h exists])
+ AC_MSG_RESULT(yes)
+ ],[
+ AC_MSG_RESULT(no)
+ ])
+])
+
+dnl #
+dnl # 4.11 API change,
+dnl # Moved things from linux/sched.h to linux/sched/signal.h
+dnl #
+AC_DEFUN([SPL_AC_SCHED_SIGNAL_HEADER],
+ [AC_MSG_CHECKING([whether header linux/sched/signal.h exists])
+ SPL_LINUX_TRY_COMPILE([
+ #include <linux/sched.h>
+ #include <linux/sched/signal.h>
+ ],[
+ return 0;
+ ],[
+ AC_DEFINE(HAVE_SCHED_SIGNAL_HEADER, 1, [linux/sched/signal.h exists])
+ AC_MSG_RESULT(yes)
+ ],[
+ AC_MSG_RESULT(no)
+ ])
+])
+dnl #
+dnl # 3.19 API change
+dnl # The io_schedule_timeout() function is present in all 2.6.32 kernels
+dnl # but it was not exported until Linux 3.19. The RHEL 7.x kernels which
+dnl # are based on a 3.10 kernel do export this symbol.
+dnl #
+AC_DEFUN([SPL_AC_IO_SCHEDULE_TIMEOUT], [
+ AC_MSG_CHECKING([whether io_schedule_timeout() is available])
+ SPL_LINUX_TRY_COMPILE_SYMBOL([
+ #include <linux/sched.h>
+ ], [
+ (void) io_schedule_timeout(1);
+ ], [io_schedule_timeout], [], [
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_IO_SCHEDULE_TIMEOUT, 1, [yes])
+ ],[
+ AC_MSG_RESULT(no)
+ ])
+])