wait: Add missing __wait_io_event_interruptible implementation
wait_io_event_interruptible was added previously, but __wait_io_event_interruptible was never implemented. Fix it. Change-Id: I79caf0e13f61f0f4676fa6c600d7bdf2b8d9af50 Signed-off-by: Matt Wagantall <mattw@codeaurora.org> (cherry picked from commit 054aaf03b6bb437b11ee37ac0cc3c91fc1ab7258)
This commit is contained in:
committed by
Stephen Boyd
parent
125ad92255
commit
fe62c33fed
@@ -346,6 +346,24 @@ do { \
|
|||||||
__ret; \
|
__ret; \
|
||||||
})
|
})
|
||||||
|
|
||||||
|
#define __wait_io_event_interruptible(wq, condition, ret) \
|
||||||
|
do { \
|
||||||
|
DEFINE_WAIT(__wait); \
|
||||||
|
\
|
||||||
|
for (;;) { \
|
||||||
|
prepare_to_wait(&wq, &__wait, TASK_INTERRUPTIBLE); \
|
||||||
|
if (condition) \
|
||||||
|
break; \
|
||||||
|
if (!signal_pending(current)) { \
|
||||||
|
io_schedule(); \
|
||||||
|
continue; \
|
||||||
|
} \
|
||||||
|
ret = -ERESTARTSYS; \
|
||||||
|
break; \
|
||||||
|
} \
|
||||||
|
finish_wait(&wq, &__wait); \
|
||||||
|
} while (0)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* wait_io_event_interruptible - sleep until an io condition gets true
|
* wait_io_event_interruptible - sleep until an io condition gets true
|
||||||
* @wq: the waitqueue to wait on
|
* @wq: the waitqueue to wait on
|
||||||
|
|||||||
Reference in New Issue
Block a user