diff options
author | Steve French <smfrench@gmail.com> | 2011-10-20 06:22:41 +0400 |
---|---|---|
committer | Steve French <smfrench@gmail.com> | 2011-10-20 06:22:41 +0400 |
commit | fbcae3ea169189ee49dc6820478cb1d069b80a08 (patch) | |
tree | 5e5b35c3bc9c11082697c4190ff96c6a4291ef16 /include | |
parent | 71c424bac5679200e272357a225639da8bf94068 (diff) | |
parent | f06ac72e929115f2772c29727152ba0832d641e4 (diff) | |
download | linux-fbcae3ea169189ee49dc6820478cb1d069b80a08.tar.xz |
Merge branch 'cifs-3.2' of git://git.samba.org/jlayton/linux into temp-3.2-jeff
Diffstat (limited to 'include')
-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; \ |