1*b2441318SGreg Kroah-Hartman /* SPDX-License-Identifier: GPL-2.0 */ 28ede0bdbSAl Viro #ifndef __UM_IRQFLAGS_H 38ede0bdbSAl Viro #define __UM_IRQFLAGS_H 48ede0bdbSAl Viro 5a34978cbSAl Viro extern int get_signals(void); 6a34978cbSAl Viro extern int set_signals(int enable); 7a34978cbSAl Viro extern void block_signals(void); 8a34978cbSAl Viro extern void unblock_signals(void); 9a34978cbSAl Viro 103e938957SDaniel Wagner #define arch_local_save_flags arch_local_save_flags 11a34978cbSAl Viro static inline unsigned long arch_local_save_flags(void) 12a34978cbSAl Viro { 13a34978cbSAl Viro return get_signals(); 14a34978cbSAl Viro } 15a34978cbSAl Viro 163e938957SDaniel Wagner #define arch_local_irq_restore arch_local_irq_restore 17a34978cbSAl Viro static inline void arch_local_irq_restore(unsigned long flags) 18a34978cbSAl Viro { 19a34978cbSAl Viro set_signals(flags); 20a34978cbSAl Viro } 21a34978cbSAl Viro 223e938957SDaniel Wagner #define arch_local_irq_enable arch_local_irq_enable 23a34978cbSAl Viro static inline void arch_local_irq_enable(void) 24a34978cbSAl Viro { 25a34978cbSAl Viro unblock_signals(); 26a34978cbSAl Viro } 27a34978cbSAl Viro 283e938957SDaniel Wagner #define arch_local_irq_disable arch_local_irq_disable 29a34978cbSAl Viro static inline void arch_local_irq_disable(void) 30a34978cbSAl Viro { 31a34978cbSAl Viro block_signals(); 32a34978cbSAl Viro } 33a34978cbSAl Viro 343e938957SDaniel Wagner #define ARCH_IRQ_DISABLED 0 353e938957SDaniel Wagner #define ARCh_IRQ_ENABLED (SIGIO|SIGVTALRM) 36a34978cbSAl Viro 373e938957SDaniel Wagner #include <asm-generic/irqflags.h> 388ede0bdbSAl Viro 398ede0bdbSAl Viro #endif 40