blob: cbc6c0013a644521cd1b8c099626f1a1c9284f94 [file] [log] [blame]
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01001/* SPDX-License-Identifier: GPL-2.0 */
Jeff Dike65e62972006-06-04 02:51:43 -07002#ifndef __UM_IRQFLAGS_H
3#define __UM_IRQFLAGS_H
4
Al Viroa34978c2011-08-18 20:14:00 +01005extern int get_signals(void);
6extern int set_signals(int enable);
7extern void block_signals(void);
8extern void unblock_signals(void);
9
Daniel Wagner3e938952016-06-12 22:04:53 +020010#define arch_local_save_flags arch_local_save_flags
Al Viroa34978c2011-08-18 20:14:00 +010011static inline unsigned long arch_local_save_flags(void)
12{
13 return get_signals();
14}
15
Daniel Wagner3e938952016-06-12 22:04:53 +020016#define arch_local_irq_restore arch_local_irq_restore
Al Viroa34978c2011-08-18 20:14:00 +010017static inline void arch_local_irq_restore(unsigned long flags)
18{
19 set_signals(flags);
20}
21
Daniel Wagner3e938952016-06-12 22:04:53 +020022#define arch_local_irq_enable arch_local_irq_enable
Al Viroa34978c2011-08-18 20:14:00 +010023static inline void arch_local_irq_enable(void)
24{
25 unblock_signals();
26}
27
Daniel Wagner3e938952016-06-12 22:04:53 +020028#define arch_local_irq_disable arch_local_irq_disable
Al Viroa34978c2011-08-18 20:14:00 +010029static inline void arch_local_irq_disable(void)
30{
31 block_signals();
32}
33
Daniel Wagner3e938952016-06-12 22:04:53 +020034#define ARCH_IRQ_DISABLED 0
35#define ARCh_IRQ_ENABLED (SIGIO|SIGVTALRM)
Al Viroa34978c2011-08-18 20:14:00 +010036
Daniel Wagner3e938952016-06-12 22:04:53 +020037#include <asm-generic/irqflags.h>
Jeff Dike65e62972006-06-04 02:51:43 -070038
39#endif