Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=f776d12dd16da1b0cd55a1240002c1b31f315d5d
Commit:     f776d12dd16da1b0cd55a1240002c1b31f315d5d
Parent:     f021a3c2b14d0dd082c2cee890c204d9e1dee52b
Author:     Matthew Wilcox <[EMAIL PROTECTED]>
AuthorDate: Thu Dec 6 11:15:50 2007 -0500
Committer:  Matthew Wilcox <[EMAIL PROTECTED]>
CommitDate: Thu Dec 6 17:35:35 2007 -0500

    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 <[EMAIL PROTECTED]>
---
 include/linux/sched.h |    9 ++++++++-
 kernel/signal.c       |    5 +++++
 2 files changed, 13 insertions(+), 1 deletions(-)

diff --git a/include/linux/sched.h b/include/linux/sched.h
index 70d87f2..95395c1 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -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));
diff --git a/kernel/signal.c b/kernel/signal.c
index fd4797f..657aa16 100644
--- a/kernel/signal.c
+++ b/kernel/signal.c
@@ -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.
  */
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to