new helpers: {clear,test,test_and_clear}_restore_sigmask()
[sfrench/cifs-2.6.git] / arch / x86 / include / asm / thread_info.h
index 5c25de07cba82fca1fbd027a3038f5f6cedf66ec..8f3f1ff69fa98e84e32662e8802d2b8b97d72df8 100644 (file)
@@ -250,6 +250,22 @@ static inline void set_restore_sigmask(void)
        ti->status |= TS_RESTORE_SIGMASK;
        set_bit(TIF_SIGPENDING, (unsigned long *)&ti->flags);
 }
+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;
+}
 
 static inline bool is_ia32_task(void)
 {