提交 94d3d824 编写于 作者: O Oleg Nesterov 提交者: Ingo Molnar

sched: do_wait_for_common: use signal_pending_state()

Change do_wait_for_common() to use signal_pending_state() instead of open
coding.
Signed-off-by: NOleg Nesterov <oleg@tv-sign.ru>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NIngo Molnar <mingo@elte.hu>
上级 f58e2c33
......@@ -4599,10 +4599,7 @@ do_wait_for_common(struct completion *x, long timeout, int state)
wait.flags |= WQ_FLAG_EXCLUSIVE;
__add_wait_queue_tail(&x->wait, &wait);
do {
if ((state == TASK_INTERRUPTIBLE &&
signal_pending(current)) ||
(state == TASK_KILLABLE &&
fatal_signal_pending(current))) {
if (signal_pending_state(state, current)) {
timeout = -ERESTARTSYS;
break;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册