signal: Use task_is_*
authorMatthew Wilcox <matthew@wil.cx>
Thu, 6 Dec 2007 16:07:35 +0000 (11:07 -0500)
committerMatthew Wilcox <willy@linux.intel.com>
Thu, 6 Dec 2007 22:35:04 +0000 (17:35 -0500)
Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
kernel/signal.c

index afa4f781f924999086c3fe2f34530e1ee84b6496..c5a401aa715c4f2bcfa885db4a6734f72e51d899 100644 (file)
@@ -838,7 +838,7 @@ static inline int wants_signal(int sig, struct task_struct *p)
                return 0;
        if (sig == SIGKILL)
                return 1;
-       if (p->state & (TASK_STOPPED | TASK_TRACED))
+       if (task_is_stopped_or_traced(p))
                return 0;
        return task_curr(p) || !signal_pending(p);
 }
@@ -1441,7 +1441,7 @@ void do_notify_parent(struct task_struct *tsk, int sig)
        BUG_ON(sig == -1);
 
        /* 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 &&
               (tsk->group_leader != tsk || !thread_group_empty(tsk)));
@@ -1729,7 +1729,7 @@ static int do_signal_stop(int signr)
                         * so this check has no races.
                         */
                        if (!t->exit_state &&
-                           !(t->state & (TASK_STOPPED|TASK_TRACED))) {
+                           !task_is_stopped_or_traced(t)) {
                                stop_count++;
                                signal_wake_up(t, 0);
                        }