xref: /linux/arch/um/include/asm/irqflags.h (revision 3e93895735745916756122d58941be89a17c42b4)
18ede0bdbSAl Viro #ifndef __UM_IRQFLAGS_H
28ede0bdbSAl Viro #define __UM_IRQFLAGS_H
38ede0bdbSAl Viro 
4a34978cbSAl Viro extern int get_signals(void);
5a34978cbSAl Viro extern int set_signals(int enable);
6a34978cbSAl Viro extern void block_signals(void);
7a34978cbSAl Viro extern void unblock_signals(void);
8a34978cbSAl Viro 
9*3e938957SDaniel Wagner #define arch_local_save_flags arch_local_save_flags
10a34978cbSAl Viro static inline unsigned long arch_local_save_flags(void)
11a34978cbSAl Viro {
12a34978cbSAl Viro 	return get_signals();
13a34978cbSAl Viro }
14a34978cbSAl Viro 
15*3e938957SDaniel Wagner #define arch_local_irq_restore arch_local_irq_restore
16a34978cbSAl Viro static inline void arch_local_irq_restore(unsigned long flags)
17a34978cbSAl Viro {
18a34978cbSAl Viro 	set_signals(flags);
19a34978cbSAl Viro }
20a34978cbSAl Viro 
21*3e938957SDaniel Wagner #define arch_local_irq_enable arch_local_irq_enable
22a34978cbSAl Viro static inline void arch_local_irq_enable(void)
23a34978cbSAl Viro {
24a34978cbSAl Viro 	unblock_signals();
25a34978cbSAl Viro }
26a34978cbSAl Viro 
27*3e938957SDaniel Wagner #define arch_local_irq_disable arch_local_irq_disable
28a34978cbSAl Viro static inline void arch_local_irq_disable(void)
29a34978cbSAl Viro {
30a34978cbSAl Viro 	block_signals();
31a34978cbSAl Viro }
32a34978cbSAl Viro 
33*3e938957SDaniel Wagner #define ARCH_IRQ_DISABLED	0
34*3e938957SDaniel Wagner #define ARCh_IRQ_ENABLED	(SIGIO|SIGVTALRM)
35a34978cbSAl Viro 
36*3e938957SDaniel Wagner #include <asm-generic/irqflags.h>
378ede0bdbSAl Viro 
388ede0bdbSAl Viro #endif
39