summaryrefslogtreecommitdiffstats
path: root/include/linux/irqflags.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/irqflags.h')
-rw-r--r--include/linux/irqflags.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/irqflags.h b/include/linux/irqflags.h
index 5ec0fa713..2b665c32f 100644
--- a/include/linux/irqflags.h
+++ b/include/linux/irqflags.h
@@ -13,6 +13,7 @@
#define _LINUX_TRACE_IRQFLAGS_H
#include <linux/typecheck.h>
+#include <linux/cleanup.h>
#include <asm/irqflags.h>
#include <asm/percpu.h>
@@ -267,4 +268,10 @@ extern void warn_bogus_irq_restore(void);
#define irqs_disabled_flags(flags) raw_irqs_disabled_flags(flags)
+DEFINE_LOCK_GUARD_0(irq, local_irq_disable(), local_irq_enable())
+DEFINE_LOCK_GUARD_0(irqsave,
+ local_irq_save(_T->flags),
+ local_irq_restore(_T->flags),
+ unsigned long flags)
+
#endif