new helpers: {clear,test,test_and_clear}_restore_sigmask()
[sfrench/cifs-2.6.git] / arch / microblaze / include / asm / thread_info.h
index 1a8ab6a5c03fc3ab399cd8fa75003b4220e69cd5..12e39206b3efcf76f81e1141e204d8356ff4d992 100644 (file)
@@ -168,6 +168,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;
+}
 #endif
 
 #endif /* __KERNEL__ */