mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 07:12:09 +00:00
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>
This commit is contained in:
parent
80fe728d59
commit
4e4c22c711
6 changed files with 22 additions and 11 deletions
|
@ -92,6 +92,19 @@ static inline int test_ti_thread_flag(struct thread_info *ti, int flag)
|
|||
#define set_need_resched() set_thread_flag(TIF_NEED_RESCHED)
|
||||
#define clear_need_resched() clear_thread_flag(TIF_NEED_RESCHED)
|
||||
|
||||
#endif
|
||||
#ifdef TIF_RESTORE_SIGMASK
|
||||
/**
|
||||
* set_restore_sigmask() - make sure saved_sigmask processing gets done
|
||||
*
|
||||
* This sets TIF_RESTORE_SIGMASK and ensures that the arch signal code
|
||||
* will run before returning to user mode, to process the flag.
|
||||
*/
|
||||
static inline void set_restore_sigmask(void)
|
||||
{
|
||||
set_thread_flag(TIF_RESTORE_SIGMASK);
|
||||
}
|
||||
#endif /* TIF_RESTORE_SIGMASK */
|
||||
|
||||
#endif /* __KERNEL__ */
|
||||
|
||||
#endif /* _LINUX_THREAD_INFO_H */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue