diff options
-rw-r--r-- | include/linux/sched.h | 9 | ||||
-rw-r--r-- | kernel/signal.c | 5 |
2 files changed, 13 insertions, 1 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h index 70d87f2fd23e..95395c143bab 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -1872,7 +1872,14 @@ static inline int signal_pending(struct task_struct *p) | |||
1872 | { | 1872 | { |
1873 | return unlikely(test_tsk_thread_flag(p,TIF_SIGPENDING)); | 1873 | return unlikely(test_tsk_thread_flag(p,TIF_SIGPENDING)); |
1874 | } | 1874 | } |
1875 | 1875 | ||
1876 | extern int FASTCALL(__fatal_signal_pending(struct task_struct *p)); | ||
1877 | |||
1878 | static inline int fatal_signal_pending(struct task_struct *p) | ||
1879 | { | ||
1880 | return signal_pending(p) && __fatal_signal_pending(p); | ||
1881 | } | ||
1882 | |||
1876 | static inline int need_resched(void) | 1883 | static inline int need_resched(void) |
1877 | { | 1884 | { |
1878 | return unlikely(test_thread_flag(TIF_NEED_RESCHED)); | 1885 | return unlikely(test_thread_flag(TIF_NEED_RESCHED)); |
diff --git a/kernel/signal.c b/kernel/signal.c index fd4797f30628..657aa16d97cb 100644 --- a/kernel/signal.c +++ b/kernel/signal.c | |||
@@ -994,6 +994,11 @@ void zap_other_threads(struct task_struct *p) | |||
994 | } | 994 | } |
995 | } | 995 | } |
996 | 996 | ||
997 | int fastcall __fatal_signal_pending(struct task_struct *tsk) | ||
998 | { | ||
999 | return sigismember(&tsk->pending.signal, SIGKILL); | ||
1000 | } | ||
1001 | |||
997 | /* | 1002 | /* |
998 | * Must be called under rcu_read_lock() or with tasklist_lock read-held. | 1003 | * Must be called under rcu_read_lock() or with tasklist_lock read-held. |
999 | */ | 1004 | */ |