Merge tag 'mips_6.5_1' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux
[linux-block.git] / include / linux / irqflags.h
index 5ec0fa71399e47e526265fe2c11ef52ad6088e80..2b665c32f5fe66edee1f88a19aa6f0a8f12877a3 100644 (file)
@@ -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