summaryrefslogtreecommitdiffstats
path: root/include/asm-sh/hardirq.h
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2000-04-28 01:09:25 +0000
committerRalf Baechle <ralf@linux-mips.org>2000-04-28 01:09:25 +0000
commitb9ba7aeb165cffecdffb60aec8c3fa8d590d9ca9 (patch)
tree42d07b0c7246ae2536a702e7c5de9e2732341116 /include/asm-sh/hardirq.h
parent7406b0a326f2d70ade2671c37d1beef62249db97 (diff)
Merge with 2.3.99-pre6.
Diffstat (limited to 'include/asm-sh/hardirq.h')
-rw-r--r--include/asm-sh/hardirq.h14
1 files changed, 11 insertions, 3 deletions
diff --git a/include/asm-sh/hardirq.h b/include/asm-sh/hardirq.h
index 40ae80f51..e57d0e31a 100644
--- a/include/asm-sh/hardirq.h
+++ b/include/asm-sh/hardirq.h
@@ -1,14 +1,22 @@
#ifndef __ASM_SH_HARDIRQ_H
#define __ASM_SH_HARDIRQ_H
+#include <linux/config.h>
#include <linux/threads.h>
extern unsigned int local_irq_count[NR_CPUS];
-#define in_interrupt() (local_irq_count[smp_processor_id()] != 0)
+extern unsigned int local_bh_count[NR_CPUS];
+
+/*
+ * Are we in an interrupt context? Either doing bottom half
+ * or hardware interrupt processing?
+ */
+#define in_interrupt() ({ int __cpu = smp_processor_id(); \
+ (local_irq_count[__cpu] + local_bh_count[__cpu] != 0); })
#define in_irq() (local_irq_count[smp_processor_id()] != 0)
-#ifndef __SMP__
+#ifndef CONFIG_SMP
#define hardirq_trylock(cpu) (local_irq_count[cpu] == 0)
#define hardirq_endlock(cpu) do { } while (0)
@@ -22,5 +30,5 @@ extern unsigned int local_irq_count[NR_CPUS];
#error Super-H SMP is not available
-#endif /* __SMP__ */
+#endif /* CONFIG_SMP */
#endif /* __ASM_SH_HARDIRQ_H */