sched/wait: Use freezable_schedule() when possible
[sfrench/cifs-2.6.git] / include / linux / wait.h
index ed7c122cb31f407f70a36a198d5e6d9ae48c01fa..5f3efabc36f4bb27af254bd7533e6c869bb68aaa 100644 (file)
@@ -308,7 +308,7 @@ do {                                                                                \
 
 #define __wait_event_freezable(wq_head, condition)                             \
        ___wait_event(wq_head, condition, TASK_INTERRUPTIBLE, 0, 0,             \
-                           schedule(); try_to_freeze())
+                           freezable_schedule())
 
 /**
  * wait_event_freezable - sleep (or freeze) until a condition gets true
@@ -367,7 +367,7 @@ do {                                                                                \
 #define __wait_event_freezable_timeout(wq_head, condition, timeout)            \
        ___wait_event(wq_head, ___wait_cond_timeout(condition),                 \
                      TASK_INTERRUPTIBLE, 0, timeout,                           \
-                     __ret = schedule_timeout(__ret); try_to_freeze())
+                     __ret = freezable_schedule_timeout(__ret))
 
 /*
  * like wait_event_timeout() -- except it uses TASK_INTERRUPTIBLE to avoid
@@ -588,7 +588,7 @@ do {                                                                                \
 
 #define __wait_event_freezable_exclusive(wq, condition)                                \
        ___wait_event(wq, condition, TASK_INTERRUPTIBLE, 1, 0,                  \
-                       schedule(); try_to_freeze())
+                       freezable_schedule())
 
 #define wait_event_freezable_exclusive(wq, condition)                          \
 ({                                                                             \