Greg Kroah-Hartman | b244131 | 2017-11-01 15:07:57 +0100 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
Jeff Dike | 65e6297 | 2006-06-04 02:51:43 -0700 | [diff] [blame] | 2 | #ifndef __UM_IRQFLAGS_H |
| 3 | #define __UM_IRQFLAGS_H |
| 4 | |
Johannes Berg | fbb42e7f | 2021-03-05 13:19:54 +0100 | [diff] [blame] | 5 | extern int signals_enabled; |
| 6 | int set_signals(int enable); |
| 7 | void block_signals(void); |
| 8 | void unblock_signals(void); |
Al Viro | a34978c | 2011-08-18 20:14:00 +0100 | [diff] [blame] | 9 | |
Daniel Wagner | 3e93895 | 2016-06-12 22:04:53 +0200 | [diff] [blame] | 10 | #define arch_local_save_flags arch_local_save_flags |
Al Viro | a34978c | 2011-08-18 20:14:00 +0100 | [diff] [blame] | 11 | static inline unsigned long arch_local_save_flags(void) |
| 12 | { |
Johannes Berg | fbb42e7f | 2021-03-05 13:19:54 +0100 | [diff] [blame] | 13 | return signals_enabled; |
Al Viro | a34978c | 2011-08-18 20:14:00 +0100 | [diff] [blame] | 14 | } |
| 15 | |
Daniel Wagner | 3e93895 | 2016-06-12 22:04:53 +0200 | [diff] [blame] | 16 | #define arch_local_irq_restore arch_local_irq_restore |
Al Viro | a34978c | 2011-08-18 20:14:00 +0100 | [diff] [blame] | 17 | static inline void arch_local_irq_restore(unsigned long flags) |
| 18 | { |
| 19 | set_signals(flags); |
| 20 | } |
| 21 | |
Daniel Wagner | 3e93895 | 2016-06-12 22:04:53 +0200 | [diff] [blame] | 22 | #define arch_local_irq_enable arch_local_irq_enable |
Al Viro | a34978c | 2011-08-18 20:14:00 +0100 | [diff] [blame] | 23 | static inline void arch_local_irq_enable(void) |
| 24 | { |
| 25 | unblock_signals(); |
| 26 | } |
| 27 | |
Daniel Wagner | 3e93895 | 2016-06-12 22:04:53 +0200 | [diff] [blame] | 28 | #define arch_local_irq_disable arch_local_irq_disable |
Al Viro | a34978c | 2011-08-18 20:14:00 +0100 | [diff] [blame] | 29 | static inline void arch_local_irq_disable(void) |
| 30 | { |
| 31 | block_signals(); |
| 32 | } |
| 33 | |
Daniel Wagner | 3e93895 | 2016-06-12 22:04:53 +0200 | [diff] [blame] | 34 | #define ARCH_IRQ_DISABLED 0 |
Al Viro | a34978c | 2011-08-18 20:14:00 +0100 | [diff] [blame] | 35 | |
Daniel Wagner | 3e93895 | 2016-06-12 22:04:53 +0200 | [diff] [blame] | 36 | #include <asm-generic/irqflags.h> |
Jeff Dike | 65e6297 | 2006-06-04 02:51:43 -0700 | [diff] [blame] | 37 | |
| 38 | #endif |