2 * include/asm/irqflags.h
6 * This file gets included from lowlevel asm headers too, to provide
7 * wrapped versions of the local_irq_*() APIs, based on the
8 * raw_local_irq_*() functions from the lowlevel headers.
10 #ifndef _ASM_IRQFLAGS_H
11 #define _ASM_IRQFLAGS_H
15 static inline unsigned long __raw_local_save_flags(void)
27 #define raw_local_save_flags(flags) \
28 do { (flags) = __raw_local_save_flags(); } while (0)
30 static inline void raw_local_irq_restore(unsigned long flags
)
40 static inline void raw_local_irq_disable(void)
50 static inline void raw_local_irq_enable(void)
60 static inline int raw_irqs_disabled_flags(unsigned long flags
)
65 static inline int raw_irqs_disabled(void)
67 unsigned long flags
= __raw_local_save_flags();
69 return raw_irqs_disabled_flags(flags
);
75 static inline unsigned long __raw_local_irq_save(void)
77 unsigned long flags
= __raw_local_save_flags();
79 raw_local_irq_disable();
84 #define raw_local_irq_save(flags) \
85 do { (flags) = __raw_local_irq_save(); } while (0)
87 #endif /* (__ASSEMBLY__) */
89 #endif /* !(_ASM_IRQFLAGS_H) */