2 * include/asm-i386/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 #define raw_local_save_flags(flags) \
16 do { (flags) = __raw_local_save_flags(); } while (0)
18 unsigned long __raw_local_save_flags(void);
19 void raw_local_irq_restore(unsigned long flags);
20 void raw_local_irq_disable(void);
21 void raw_local_irq_enable(void);
24 * Used in the idle loop; sti takes one instruction cycle
27 void raw_safe_halt(void);
30 * Used when interrupts are already enabled or to
31 * shutdown the processor:
35 static inline int raw_irqs_disabled_flags(unsigned long flags)
40 int raw_irqs_disabled(void);
45 unsigned long __raw_local_irq_save(void);
46 #define raw_local_irq_save(flags) \
47 do { (flags) = __raw_local_irq_save(); } while (0)
49 #endif /* __ASSEMBLY__ */
52 * Do the CPU's IRQ-state tracing from assembly code. We call a
53 * C function, so save all the C-clobbered registers:
55 #ifdef CONFIG_TRACE_IRQFLAGS
57 # define TRACE_IRQS_ON \
61 call trace_hardirqs_on; \
66 # define TRACE_IRQS_OFF \
70 call trace_hardirqs_off; \
76 # define TRACE_IRQS_ON
77 # define TRACE_IRQS_OFF