aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorRoland McGrath <roland@redhat.com>2008-04-30 03:53:06 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-04-30 11:29:37 -0400
commit4e4c22c71144c1b2e22c257ec6cf08ccb5be1165 (patch)
tree0a41fb405ab60654f70ead9698d5ce414a066c37 /include
parent80fe728d593e3a048a56610de932919f7d6d968a (diff)
signals: add set_restore_sigmask
This adds the set_restore_sigmask() inline in <linux/thread_info.h> and replaces every set_thread_flag(TIF_RESTORE_SIGMASK) with a call to it. No change, but abstracts the details of the flag protocol from all the calls. Signed-off-by: Roland McGrath <roland@redhat.com> Cc: Oleg Nesterov <oleg@tv-sign.ru> Cc: Ingo Molnar <mingo@elte.hu> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Martin Schwidefsky <schwidefsky@de.ibm.com> Cc: Heiko Carstens <heiko.carstens@de.ibm.com> Cc: "Luck, Tony" <tony.luck@intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/thread_info.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/include/linux/thread_info.h b/include/linux/thread_info.h
index accd7bad35b0..43d8162c696e 100644
--- a/include/linux/thread_info.h
+++ b/include/linux/thread_info.h
@@ -92,6 +92,19 @@ static inline int test_ti_thread_flag(struct thread_info *ti, int flag)
92#define set_need_resched() set_thread_flag(TIF_NEED_RESCHED) 92#define set_need_resched() set_thread_flag(TIF_NEED_RESCHED)
93#define clear_need_resched() clear_thread_flag(TIF_NEED_RESCHED) 93#define clear_need_resched() clear_thread_flag(TIF_NEED_RESCHED)
94 94
95#endif 95#ifdef TIF_RESTORE_SIGMASK
96/**
97 * set_restore_sigmask() - make sure saved_sigmask processing gets done
98 *
99 * This sets TIF_RESTORE_SIGMASK and ensures that the arch signal code
100 * will run before returning to user mode, to process the flag.
101 */
102static inline void set_restore_sigmask(void)
103{
104 set_thread_flag(TIF_RESTORE_SIGMASK);
105}
106#endif /* TIF_RESTORE_SIGMASK */
107
108#endif /* __KERNEL__ */
96 109
97#endif /* _LINUX_THREAD_INFO_H */ 110#endif /* _LINUX_THREAD_INFO_H */