diff options
author | Paul Mackerras <paulus@samba.org> | 2008-06-16 14:53:25 +1000 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2008-06-16 14:53:25 +1000 |
commit | a9653cf540d407fb75deb3db65a1be6c81d53ee0 (patch) | |
tree | 075fb79746f1d74443c9a9062e73c26a6266b05c /include/linux/sched.h | |
parent | e80ac32767d0f781ac195c472d500a7451d3729a (diff) | |
parent | 066519068ad2fbe98c7f45552b1f592903a9c8c8 (diff) |
Merge branch 'linux-2.6' into merge
Diffstat (limited to 'include/linux/sched.h')
-rw-r--r-- | include/linux/sched.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h index ae0be3c6237..c5d3f847ca8 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -2026,6 +2026,19 @@ static inline int fatal_signal_pending(struct task_struct *p) return signal_pending(p) && __fatal_signal_pending(p); } +static inline int signal_pending_state(long state, struct task_struct *p) +{ + if (!(state & (TASK_INTERRUPTIBLE | TASK_WAKEKILL))) + return 0; + if (!signal_pending(p)) + return 0; + + if (state & (__TASK_STOPPED | __TASK_TRACED)) + return 0; + + return (state & TASK_INTERRUPTIBLE) || __fatal_signal_pending(p); +} + static inline int need_resched(void) { return unlikely(test_thread_flag(TIF_NEED_RESCHED)); |