patch-2.3.49 linux/include/asm-i386/hardirq.h
Next file: linux/include/asm-i386/hw_irq.h
Previous file: linux/include/asm-arm/system.h
Back to the patch index
Back to the overall index
- Lines: 23
- Date:
Thu Mar 2 14:01:21 2000
- Orig file:
v2.3.48/linux/include/asm-i386/hardirq.h
- Orig date:
Sat Feb 26 22:31:55 2000
diff -u --recursive --new-file v2.3.48/linux/include/asm-i386/hardirq.h linux/include/asm-i386/hardirq.h
@@ -4,6 +4,22 @@
#include <linux/threads.h>
#include <linux/irq.h>
+typedef struct {
+ unsigned int __local_irq_count;
+ unsigned int __local_bh_count;
+ atomic_t __nmi_counter;
+ unsigned int __pad[5];
+} ____cacheline_aligned irq_cpustat_t;
+
+extern irq_cpustat_t irq_stat [NR_CPUS];
+
+/*
+ * Simple wrappers reducing source bloat
+ */
+#define local_irq_count(cpu) (irq_stat[(cpu)].__local_irq_count)
+#define local_bh_count(cpu) (irq_stat[(cpu)].__local_bh_count)
+#define nmi_counter(cpu) (irq_stat[(cpu)].__nmi_counter)
+
/*
* Are we in an interrupt context? Either doing bottom half
* or hardware interrupt processing?
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)