mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
new helpers: {clear,test,test_and_clear}_restore_sigmask()
helpers parallel to set_restore_sigmask(), used in the next commits Signed-off-by: Al Viro <[email protected]>
This commit is contained in:
parent
754421c8ca
commit
4ebefe3ec7
8 changed files with 125 additions and 0 deletions
|
|
@ -189,6 +189,23 @@ static inline unsigned int get_thread_fault_code(void)
|
|||
struct thread_info *ti = current_thread_info();
|
||||
return ti->flags >> TI_FLAG_FAULT_CODE_SHIFT;
|
||||
}
|
||||
|
||||
static inline void clear_restore_sigmask(void)
|
||||
{
|
||||
current_thread_info()->status &= ~TS_RESTORE_SIGMASK;
|
||||
}
|
||||
static inline bool test_restore_sigmask(void)
|
||||
{
|
||||
return current_thread_info()->status & TS_RESTORE_SIGMASK;
|
||||
}
|
||||
static inline bool test_and_clear_restore_sigmask(void)
|
||||
{
|
||||
struct thread_info *ti = current_thread_info();
|
||||
if (!(ti->status & TS_RESTORE_SIGMASK))
|
||||
return false;
|
||||
ti->status &= ~TS_RESTORE_SIGMASK;
|
||||
return true;
|
||||
}
|
||||
#endif /* !__ASSEMBLY__ */
|
||||
|
||||
#endif /* __KERNEL__ */
|
||||
|
|
|
|||
Loading…
Reference in a new issue