aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorChirayu Desai <cdesai@cyanogenmod.org>2013-06-08 14:13:36 +0530
committerChirayu Desai <cdesai@cyanogenmod.org>2013-06-08 14:13:36 +0530
commit0ea6eab87c85317af3fc549950715b9e42795706 (patch)
tree59668f4c72c2a3b5640ae212864013644b6911ce /include
parentad5ca4cbf2df1d5e30269097e57ddbf13d8c189d (diff)
parent1e18293a23fdc4e28b07302ad6a5ed99f7a26348 (diff)
downloadkernel_samsung_aries-0ea6eab87c85317af3fc549950715b9e42795706.zip
kernel_samsung_aries-0ea6eab87c85317af3fc549950715b9e42795706.tar.gz
kernel_samsung_aries-0ea6eab87c85317af3fc549950715b9e42795706.tar.bz2
Merge tag 'v3.0.81' of git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable into HEAD
This is the 3.0.81 stable release
Diffstat (limited to 'include')
-rw-r--r--include/linux/wait.h16
1 files changed, 11 insertions, 5 deletions
diff --git a/include/linux/wait.h b/include/linux/wait.h
index 3efc9f3..bea7ad5 100644
--- a/include/linux/wait.h
+++ b/include/linux/wait.h
@@ -233,6 +233,8 @@ do { \
if (!ret) \
break; \
} \
+ if (!ret && (condition)) \
+ ret = 1; \
finish_wait(&wq, &__wait); \
} while (0)
@@ -249,8 +251,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) \
({ \
@@ -318,6 +321,8 @@ do { \
ret = -ERESTARTSYS; \
break; \
} \
+ if (!ret && (condition)) \
+ ret = 1; \
finish_wait(&wq, &__wait); \
} while (0)
@@ -334,9 +339,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) \
({ \