2 * include/asm-x86_64/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
18 unsigned long __raw_local_save_flags(void);
19 #define raw_local_save_flags(flags) \
20 do { (flags) = __raw_local_save_flags(); } while (0)
22 void raw_local_irq_restore(unsigned long flags);
23 void raw_local_irq_disable(void);
24 void raw_local_irq_enable(void);
26 static inline int raw_irqs_disabled_flags(unsigned long flags)
32 * For spinlocks, etc.:
35 unsigned long __raw_local_irq_save(void);
37 #define raw_local_irq_save(flags) \
38 do { (flags) = __raw_local_irq_save(); } while (0)
40 int raw_irqs_disabled(void);
43 * Used in the idle loop; sti takes one instruction cycle
46 void raw_safe_halt(void);
50 * Used when interrupts are already enabled or to
51 * shutdown the processor:
55 #else /* __ASSEMBLY__: */
56 # ifdef CONFIG_TRACE_IRQFLAGS
57 # define TRACE_IRQS_ON call trace_hardirqs_on_thunk
58 # define TRACE_IRQS_OFF call trace_hardirqs_off_thunk
60 # define TRACE_IRQS_ON
61 # define TRACE_IRQS_OFF