aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/sched.h
diff options
context:
space:
mode:
authorRoland McGrath <roland@redhat.com>2009-09-23 18:57:04 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-09-24 10:21:01 -0400
commitd9588725e52650e82989707f8fd2feb67ad2dc8e (patch)
tree39a9f9f5e8ba6a6e008b9ada310347e24ede400e /include/linux/sched.h
parentba0a6c9f6fceed11c6a99e8326f0477fe383e6b5 (diff)
signals: inline __fatal_signal_pending
__fatal_signal_pending inlines to one instruction on x86, probably two instructions on other machines. It takes two longer x86 instructions just to call it and test its return value, not to mention the function itself. On my random x86_64 config, this saved 70 bytes of text (59 of those being __fatal_signal_pending itself). Signed-off-by: Roland McGrath <roland@redhat.com> Cc: Oleg Nesterov <oleg@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/sched.h')
-rw-r--r--include/linux/sched.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 9e5a88afe6be..e951bd2eb9fc 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -2337,7 +2337,10 @@ static inline int signal_pending(struct task_struct *p)
2337 return unlikely(test_tsk_thread_flag(p,TIF_SIGPENDING)); 2337 return unlikely(test_tsk_thread_flag(p,TIF_SIGPENDING));
2338} 2338}
2339 2339
2340extern int __fatal_signal_pending(struct task_struct *p); 2340static inline int __fatal_signal_pending(struct task_struct *p)
2341{
2342 return unlikely(sigismember(&p->pending.signal, SIGKILL));
2343}
2341 2344
2342static inline int fatal_signal_pending(struct task_struct *p) 2345static inline int fatal_signal_pending(struct task_struct *p)
2343{ 2346{