irqflags.h 865 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. #ifndef __UM_IRQFLAGS_H
  3. #define __UM_IRQFLAGS_H
  4. extern int get_signals(void);
  5. extern int set_signals(int enable);
  6. extern void block_signals(void);
  7. extern void unblock_signals(void);
  8. #define arch_local_save_flags arch_local_save_flags
  9. static inline unsigned long arch_local_save_flags(void)
  10. {
  11. return get_signals();
  12. }
  13. #define arch_local_irq_restore arch_local_irq_restore
  14. static inline void arch_local_irq_restore(unsigned long flags)
  15. {
  16. set_signals(flags);
  17. }
  18. #define arch_local_irq_enable arch_local_irq_enable
  19. static inline void arch_local_irq_enable(void)
  20. {
  21. unblock_signals();
  22. }
  23. #define arch_local_irq_disable arch_local_irq_disable
  24. static inline void arch_local_irq_disable(void)
  25. {
  26. block_signals();
  27. }
  28. #define ARCH_IRQ_DISABLED 0
  29. #define ARCh_IRQ_ENABLED (SIGIO|SIGVTALRM)
  30. #include <asm-generic/irqflags.h>
  31. #endif