summaryrefslogtreecommitdiffstats
path: root/include/linux/freezer.h
diff options
context:
space:
mode:
authorSteve French <smfrench@gmail.com>2011-10-19 21:22:41 -0500
committerSteve French <smfrench@gmail.com>2011-10-19 21:22:41 -0500
commitfbcae3ea169189ee49dc6820478cb1d069b80a08 (patch)
tree5e5b35c3bc9c11082697c4190ff96c6a4291ef16 /include/linux/freezer.h
parent71c424bac5679200e272357a225639da8bf94068 (diff)
parentf06ac72e929115f2772c29727152ba0832d641e4 (diff)
downloadtalos-op-linux-fbcae3ea169189ee49dc6820478cb1d069b80a08.tar.gz
talos-op-linux-fbcae3ea169189ee49dc6820478cb1d069b80a08.zip
Merge branch 'cifs-3.2' of git://git.samba.org/jlayton/linux into temp-3.2-jeff
Diffstat (limited to 'include/linux/freezer.h')
-rw-r--r--include/linux/freezer.h19
1 files changed, 17 insertions, 2 deletions
diff --git a/include/linux/freezer.h b/include/linux/freezer.h
index 1effc8b56b4e..3672f731f03a 100644
--- a/include/linux/freezer.h
+++ b/include/linux/freezer.h
@@ -134,10 +134,25 @@ static inline void set_freezable_with_signal(void)
}
/*
- * Freezer-friendly wrappers around wait_event_interruptible() and
- * wait_event_interruptible_timeout(), originally defined in <linux/wait.h>
+ * Freezer-friendly wrappers around wait_event_interruptible(),
+ * wait_event_killable() and wait_event_interruptible_timeout(), originally
+ * defined in <linux/wait.h>
*/
+#define wait_event_freezekillable(wq, condition) \
+({ \
+ int __retval; \
+ do { \
+ __retval = wait_event_killable(wq, \
+ (condition) || freezing(current)); \
+ if (__retval && !freezing(current)) \
+ break; \
+ else if (!(condition)) \
+ __retval = -ERESTARTSYS; \
+ } while (try_to_freeze()); \
+ __retval; \
+})
+
#define wait_event_freezable(wq, condition) \
({ \
int __retval; \
OpenPOWER on IntegriCloud