Commit e1abb39c authored by Matthew Wilcox's avatar Matthew Wilcox Committed by Matthew Wilcox

signal: Use task_is_*

Signed-off-by: default avatarMatthew Wilcox <willy@linux.intel.com>
parent d9514f6c
...@@ -838,7 +838,7 @@ static inline int wants_signal(int sig, struct task_struct *p) ...@@ -838,7 +838,7 @@ static inline int wants_signal(int sig, struct task_struct *p)
return 0; return 0;
if (sig == SIGKILL) if (sig == SIGKILL)
return 1; return 1;
if (p->state & (TASK_STOPPED | TASK_TRACED)) if (task_is_stopped_or_traced(p))
return 0; return 0;
return task_curr(p) || !signal_pending(p); return task_curr(p) || !signal_pending(p);
} }
...@@ -1441,7 +1441,7 @@ void do_notify_parent(struct task_struct *tsk, int sig) ...@@ -1441,7 +1441,7 @@ void do_notify_parent(struct task_struct *tsk, int sig)
BUG_ON(sig == -1); BUG_ON(sig == -1);
/* do_notify_parent_cldstop should have been called instead. */ /* do_notify_parent_cldstop should have been called instead. */
BUG_ON(tsk->state & (TASK_STOPPED|TASK_TRACED)); BUG_ON(task_is_stopped_or_traced(tsk));
BUG_ON(!tsk->ptrace && BUG_ON(!tsk->ptrace &&
(tsk->group_leader != tsk || !thread_group_empty(tsk))); (tsk->group_leader != tsk || !thread_group_empty(tsk)));
...@@ -1729,7 +1729,7 @@ static int do_signal_stop(int signr) ...@@ -1729,7 +1729,7 @@ static int do_signal_stop(int signr)
* so this check has no races. * so this check has no races.
*/ */
if (!t->exit_state && if (!t->exit_state &&
!(t->state & (TASK_STOPPED|TASK_TRACED))) { !task_is_stopped_or_traced(t)) {
stop_count++; stop_count++;
signal_wake_up(t, 0); signal_wake_up(t, 0);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment