diff options
| author | Steve French <sfrench@us.ibm.com> | 2008-05-06 13:55:32 -0400 |
|---|---|---|
| committer | Steve French <sfrench@us.ibm.com> | 2008-05-06 13:55:32 -0400 |
| commit | a815752ac0ffdb910e92958d41d28f4fb28e5296 (patch) | |
| tree | a3aa16a282354da0debe8e3a3a7ed8aac6e54001 /include/linux/thread_info.h | |
| parent | 5ade9deaaa3e1f7291467d97b238648e43eae15e (diff) | |
| parent | a15306365a16380f3bafee9e181ba01231d4acd7 (diff) | |
Merge branch 'master' of /pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'include/linux/thread_info.h')
| -rw-r--r-- | include/linux/thread_info.h | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/include/linux/thread_info.h b/include/linux/thread_info.h index accd7bad35b0..38a56477f27a 100644 --- a/include/linux/thread_info.h +++ b/include/linux/thread_info.h | |||
| @@ -92,6 +92,31 @@ 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 | #if defined TIF_RESTORE_SIGMASK && !defined HAVE_SET_RESTORE_SIGMASK |
| 96 | /* | ||
| 97 | * An arch can define its own version of set_restore_sigmask() to get the | ||
| 98 | * job done however works, with or without TIF_RESTORE_SIGMASK. | ||
| 99 | */ | ||
| 100 | #define HAVE_SET_RESTORE_SIGMASK 1 | ||
| 101 | |||
| 102 | /** | ||
| 103 | * set_restore_sigmask() - make sure saved_sigmask processing gets done | ||
| 104 | * | ||
| 105 | * This sets TIF_RESTORE_SIGMASK and ensures that the arch signal code | ||
| 106 | * will run before returning to user mode, to process the flag. For | ||
| 107 | * all callers, TIF_SIGPENDING is already set or it's no harm to set | ||
| 108 | * it. TIF_RESTORE_SIGMASK need not be in the set of bits that the | ||
| 109 | * arch code will notice on return to user mode, in case those bits | ||
| 110 | * are scarce. We set TIF_SIGPENDING here to ensure that the arch | ||
| 111 | * signal code always gets run when TIF_RESTORE_SIGMASK is set. | ||
| 112 | */ | ||
| 113 | static inline void set_restore_sigmask(void) | ||
| 114 | { | ||
| 115 | set_thread_flag(TIF_RESTORE_SIGMASK); | ||
| 116 | set_thread_flag(TIF_SIGPENDING); | ||
| 117 | } | ||
| 118 | #endif /* TIF_RESTORE_SIGMASK && !HAVE_SET_RESTORE_SIGMASK */ | ||
| 119 | |||
| 120 | #endif /* __KERNEL__ */ | ||
| 96 | 121 | ||
| 97 | #endif /* _LINUX_THREAD_INFO_H */ | 122 | #endif /* _LINUX_THREAD_INFO_H */ |
