diff options
author | Steven Rostedt (Red Hat) <rostedt@goodmis.org> | 2013-06-27 23:05:36 -0400 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2013-06-27 23:05:36 -0400 |
commit | 1f6497419f7c59fcb43f16fb544c86dd9f121d5e (patch) | |
tree | a1f4ef648ab65efadb0939d3e535f8ff397ad0d4 /include | |
parent | f9974bd0da356a196f5e356e3f3fab06836bc1c2 (diff) | |
parent | 1e18293a23fdc4e28b07302ad6a5ed99f7a26348 (diff) |
Merge tag 'v3.0.81' into v3.0-rt
This is the 3.0.81 stable release
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/wait.h | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/include/linux/wait.h b/include/linux/wait.h index 1e904b88c1ea..e9c3ca59e9f8 100644 --- a/include/linux/wait.h +++ b/include/linux/wait.h @@ -234,6 +234,8 @@ do { \ if (!ret) \ break; \ } \ + if (!ret && (condition)) \ + ret = 1; \ finish_wait(&wq, &__wait); \ } while (0) @@ -250,8 +252,9 @@ do { \ * wake_up() has to be called after changing any variable that could * change the result of the wait condition. * - * The function returns 0 if the @timeout elapsed, and the remaining - * jiffies if the condition evaluated to true before the timeout elapsed. + * The function returns 0 if the @timeout elapsed, or the remaining + * jiffies (at least 1) if the @condition evaluated to %true before + * the @timeout elapsed. */ #define wait_event_timeout(wq, condition, timeout) \ ({ \ @@ -319,6 +322,8 @@ do { \ ret = -ERESTARTSYS; \ break; \ } \ + if (!ret && (condition)) \ + ret = 1; \ finish_wait(&wq, &__wait); \ } while (0) @@ -335,9 +340,10 @@ do { \ * wake_up() has to be called after changing any variable that could * change the result of the wait condition. * - * The function returns 0 if the @timeout elapsed, -ERESTARTSYS if it - * was interrupted by a signal, and the remaining jiffies otherwise - * if the condition evaluated to true before the timeout elapsed. + * Returns: + * 0 if the @timeout elapsed, -%ERESTARTSYS if it was interrupted by + * a signal, or the remaining jiffies (at least 1) if the @condition + * evaluated to %true before the @timeout elapsed. */ #define wait_event_interruptible_timeout(wq, condition, timeout) \ ({ \ |