refrigerator-20050809
authorChas Williams <chas@cmf.nrl.navy.mil>
Wed, 10 Aug 2005 20:21:27 +0000 (20:21 +0000)
committerDerrick Brashear <shadow@dementia.org>
Wed, 10 Aug 2005 20:21:27 +0000 (20:21 +0000)
FIXES 20728

refrigerator takes void starting in 2.6.13

acinclude.m4
src/afs/LINUX/osi_sleep.c
src/cf/linux-test1.m4

index 8755620..3f77d8d 100644 (file)
@@ -611,6 +611,7 @@ case $AFS_SYSNAME in *_linux* | *_umlinux*)
                 LINUX_SCHED_STRUCT_TASK_STRUCT_HAS_RLIM
                 LINUX_SCHED_STRUCT_TASK_STRUCT_HAS_SIGNAL_RLIM
                 LINUX_SCHED_STRUCT_TASK_STRUCT_HAS_EXIT_STATE
+                LINUX_REFRIGERATOR
                 LINUX_WHICH_MODULES
                  if test "x$ac_cv_linux_config_modversions" = "xno" -o $AFS_SYSKVERS -ge 26; then
                    AC_MSG_WARN([Cannot determine sys_call_table status. assuming it isn't exported])
index c0e4072..75df9c0 100644 (file)
@@ -195,7 +195,11 @@ afs_osi_SleepSig(void *event)
 #ifdef AFS_LINUX26_ENV
 #ifdef CONFIG_PM
        if (current->flags & PF_FREEZE)
+#ifdef LINUX_REFRIGERATOR_TAKES_PF_FREEZE
            refrigerator(PF_FREEZE);
+#else
+           refrigerator();
+#endif
 #endif
 #endif
        AFS_GLOCK();
@@ -279,7 +283,11 @@ osi_TimedSleep(char *event, afs_int32 ams, int aintok)
 #ifdef AFS_LINUX26_ENV
 #ifdef CONFIG_PM
     if (current->flags & PF_FREEZE)
+#ifdef LINUX_REFRIGERATOR_TAKES_PF_FREEZE
        refrigerator(PF_FREEZE);
+#else
+       refrigerator();
+#endif
 #endif
 #endif
 
index 3772ed6..6902d33 100644 (file)
@@ -121,3 +121,22 @@ if test "x$ac_cv_linux_func_a_writepage_takes_writeback_control" = "xyes" ; then
 AC_DEFINE(AOP_WRITEPAGE_TAKES_WRITEBACK_CONTROL, 1, [define if your aops.writepage takes a struct writeback_control argument])
 fi
 CPPFLAGS="$save_CPPFLAGS"])
+
+AC_DEFUN([LINUX_REFRIGERATOR],[
+save_CPPFLAGS="$CPPFLAGS"
+CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS"
+AC_MSG_CHECKING(whether refrigerator takes PF_FREEZE)
+AC_CACHE_VAL(ac_cv_linux_func_refrigerator_takes_pf_freeze,
+[
+AC_TRY_COMPILE(
+[#include <linux/sched.h>],
+[
+refrigerator(PF_FREEZE);
+],
+ac_cv_linux_func_refrigerator_takes_pf_freeze=yes,
+ac_cv_linux_func_refrigerator_takes_pf_freeze=no)])
+AC_MSG_RESULT($ac_cv_linux_func_refrigerator_takes_pf_freeze)
+if test "x$ac_cv_linux_func_refrigerator_takes_pf_freeze" = "xyes" ; then
+AC_DEFINE(LINUX_REFRIGERATOR_TAKES_PF_FREEZE, 1, [define if your refrigerator takes PF_FREEZE])
+fi
+CPPFLAGS="$save_CPPFLAGS"])