提交 f776d12d 编写于 作者: M Matthew Wilcox 提交者: Matthew Wilcox

Add fatal_signal_pending

Like signal_pending, but it's only true for signals which are fatal to
this process
Signed-off-by: NMatthew Wilcox <willy@linux.intel.com>
上级 f021a3c2
......@@ -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));
......
......@@ -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.
*/
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册