]> granicus.if.org Git - spl/commitdiff
Linux 3.9 compat: Include linux/sched/rt.h
authorRichard Yao <ryao@cs.stonybrook.edu>
Mon, 4 Mar 2013 04:42:32 +0000 (23:42 -0500)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Thu, 14 Mar 2013 17:43:19 +0000 (10:43 -0700)
Linux 3.9 reorganized sched.h, splitting it into numerous files.
torvalds/linux@8bd75c77b7c6a3954140dd2e20346aef3efe4a35 moved MAX_PRIO
and MAX_RT_PRIO to linux/sched/rt.h.

Signed-off-by: Richard Yao <ryao@cs.stonybrook.edu>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
config/spl-build.m4
include/sys/sysmacros.h

index 3dcc05e65da16aa09013d4aa8e4e1ae9303b9624..eef3a76aeaa7584057477d4fab3364061b36a1cb 100644 (file)
@@ -88,6 +88,7 @@ AC_DEFUN([SPL_AC_CONFIG_KERNEL], [
        SPL_AC_2ARGS_ZLIB_DEFLATE_WORKSPACESIZE
        SPL_AC_SHRINK_CONTROL_STRUCT
        SPL_AC_RWSEM_SPINLOCK_IS_RAW
+       SPL_AC_SCHED_RT_HEADER
 ])
 
 AC_DEFUN([SPL_AC_MODULE_SYMVERS], [
@@ -2217,3 +2218,22 @@ AC_DEFUN([SPL_AC_RWSEM_SPINLOCK_IS_RAW], [
        ])
        EXTRA_KCFLAGS="$tmp_flags"
 ])
+
+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)
+       ])
+])
index 7c4da67fc9cab9d3b47bbfd03376cb70caf1bdfd..b4778b70e83fc0437879f456edc2c893ada64792 100644 (file)
 #define _SPL_SYSMACROS_H
 
 #include <linux/module.h>
+#include <linux/sched.h>
 #include <linux/cpumask.h>
 #include <sys/debug.h>
 #include <sys/varargs.h>
 #include <sys/zone.h>
 #include <sys/signal.h>
 
+#ifdef HAVE_SCHED_RT_HEADER
+#include <linux/sched/rt.h>
+#endif
+
 #ifndef _KERNEL
 #define _KERNEL                                __KERNEL__
 #endif