diff options
author | Steve French <smfrench@gmail.com> | 2011-10-19 21:22:41 -0500 |
---|---|---|
committer | Steve French <smfrench@gmail.com> | 2011-10-19 21:22:41 -0500 |
commit | fbcae3ea169189ee49dc6820478cb1d069b80a08 (patch) | |
tree | 5e5b35c3bc9c11082697c4190ff96c6a4291ef16 /include/linux/freezer.h | |
parent | 71c424bac5679200e272357a225639da8bf94068 (diff) | |
parent | f06ac72e929115f2772c29727152ba0832d641e4 (diff) | |
download | talos-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.h | 19 |
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; \ |