1#ifndef __UM_IRQFLAGS_H 2#define __UM_IRQFLAGS_H 3 4extern int get_signals(void); 5extern int set_signals(int enable); 6extern void block_signals(void); 7extern void unblock_signals(void); 8 9static inline unsigned long arch_local_save_flags(void) 10{ 11 return get_signals(); 12} 13 14static inline void arch_local_irq_restore(unsigned long flags) 15{ 16 set_signals(flags); 17} 18 19static inline void arch_local_irq_enable(void) 20{ 21 unblock_signals(); 22} 23 24static inline void arch_local_irq_disable(void) 25{ 26 block_signals(); 27} 28 29static inline unsigned long arch_local_irq_save(void) 30{ 31 unsigned long flags; 32 flags = arch_local_save_flags(); 33 arch_local_irq_disable(); 34 return flags; 35} 36 37static inline bool arch_irqs_disabled(void) 38{ 39 return arch_local_save_flags() == 0; 40} 41 42#endif 43