Add fatal_signal_pending

Like signal_pending, but it's only true for signals which are fatal to
this process

Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
This commit is contained in:
Matthew Wilcox 2007-12-06 11:15:50 -05:00 committed by Matthew Wilcox
parent f021a3c2b1
commit f776d12dd1
2 changed files with 13 additions and 1 deletions

View File

@ -1873,6 +1873,13 @@ static inline int signal_pending(struct task_struct *p)
return unlikely(test_tsk_thread_flag(p,TIF_SIGPENDING));
}
extern int FASTCALL(__fatal_signal_pending(struct task_struct *p));
static inline int fatal_signal_pending(struct task_struct *p)
{
return signal_pending(p) && __fatal_signal_pending(p);
}
static inline int need_resched(void)
{
return unlikely(test_thread_flag(TIF_NEED_RESCHED));

View File

@ -994,6 +994,11 @@ void zap_other_threads(struct task_struct *p)
}
}
int fastcall __fatal_signal_pending(struct task_struct *tsk)
{
return sigismember(&tsk->pending.signal, SIGKILL);
}
/*
* Must be called under rcu_read_lock() or with tasklist_lock read-held.
*/