]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
Add fatal_signal_pending
authorMatthew Wilcox <matthew@wil.cx>
Thu, 6 Dec 2007 16:15:50 +0000 (11:15 -0500)
committerMatthew Wilcox <willy@linux.intel.com>
Thu, 6 Dec 2007 22:35:35 +0000 (17:35 -0500)
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>
include/linux/sched.h
kernel/signal.c

index 70d87f2fd23ecb00c864a9447d8575cc74538ed3..95395c143bab84d0f1b5c0b731efc36c005413a6 100644 (file)
@@ -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));
index fd4797f306283864e6eec0fef794b7916cbcb4db..657aa16d97cbfa860b73463bee90a15830fa8b31 100644 (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.
  */