DEVEL15-linux-2620-rc1-update-20061228
[openafs.git] / src / afs / LINUX / osi_sleep.c
index 3a9cda9..1e87378 100644 (file)
@@ -17,6 +17,8 @@ RCSID
 #include "afsincludes.h"       /* Afs-based standard headers */
 #include "afs/afs_stats.h"     /* afs statistics */
 
+#include <linux/freezer.h>
+
 static int osi_TimedSleep(char *event, afs_int32 ams, int aintok);
 
 static char waitV, dummyV;
@@ -198,7 +200,11 @@ afs_osi_SleepSig(void *event)
 #ifdef PF_FREEZE
            current->flags & PF_FREEZE
 #else
+#if defined(STRUCT_TASK_STRUCT_HAS_TODO)
            !current->todo
+#else
+            test_ti_thread_flag(current->thread_info, TIF_FREEZE)
+#endif
 #endif
            )
 #ifdef LINUX_REFRIGERATOR_TAKES_PF_FREEZE
@@ -292,7 +298,11 @@ osi_TimedSleep(char *event, afs_int32 ams, int aintok)
 #ifdef PF_FREEZE
            current->flags & PF_FREEZE
 #else
+#if defined(STRUCT_TASK_STRUCT_HAS_TODO)
            !current->todo
+#else
+            test_ti_thread_flag(current->thread_info, TIF_FREEZE)
+#endif
 #endif
            )
 #ifdef LINUX_REFRIGERATOR_TAKES_PF_FREEZE