forked from Minki/linux
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:
parent
f021a3c2b1
commit
f776d12dd1
@ -1872,7 +1872,14 @@ 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));
|
||||
|
@ -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.
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user