patch-2.1.83 linux/include/linux/interrupt.h

Next file: linux/kernel/sched.c
Previous file: linux/include/asm-i386/softirq.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.82/linux/include/linux/interrupt.h linux/include/linux/interrupt.h
@@ -49,6 +49,12 @@
 #include <asm/softirq.h>
 
 /*
+ * Are we in an interrupt context? Either doing bottom half
+ * or hardware interrupt processing?
+ */
+#define in_interrupt() (local_irq_count[smp_processor_id()] + local_bh_count[smp_processor_id()] != 0)
+
+/*
  * Autoprobing for irqs:
  *
  * probe_irq_on() and probe_irq_off() provide robust primitives

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov