summaryrefslogtreecommitdiff
path: root/include/linux/interrupt.h
diff options
context:
space:
mode:
authorDavid S. Miller <davem@nuts.ninka.net>2003-03-30 22:32:13 -0800
committerDavid S. Miller <davem@nuts.ninka.net>2003-03-30 22:32:13 -0800
commite328b98a082fe40696e744440469577b4b74e013 (patch)
tree1b20742074cd8354c62c358aa40b68dcf7078708 /include/linux/interrupt.h
parent9e0206abf1d74a1001f3b4a912767d4072856cda (diff)
[SOFTIRQ]: Move softirq implementation to common area, add debug check.
1) Every arch implemented local_bh_foo identically, move to linux/interrupt.h 2) Kill all asm/softirq.h references 3) Kill asm/softirq.h itself 4) Move local_bh_disable() out of line to kernel/softirq.c 5) Add BUG check on irqs_disabled() to local_bh_disable()
Diffstat (limited to 'include/linux/interrupt.h')
-rw-r--r--include/linux/interrupt.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h
index 7a0681b9e880..e71f89ae8b3f 100644
--- a/include/linux/interrupt.h
+++ b/include/linux/interrupt.h
@@ -8,7 +8,6 @@
#include <asm/atomic.h>
#include <asm/hardirq.h>
#include <asm/ptrace.h>
-#include <asm/softirq.h>
#include <asm/system.h>
struct irqaction {
@@ -36,6 +35,13 @@ extern void free_irq(unsigned int, void *);
# define save_and_cli(x) local_irq_save(x)
#endif
+/* SoftIRQ primitives. */
+#define local_bh_disable() \
+ do { preempt_count() += SOFTIRQ_OFFSET; barrier(); } while (0)
+#define __local_bh_enable() \
+ do { barrier(); preempt_count() -= SOFTIRQ_OFFSET; } while (0)
+
+extern void local_bh_enable(void);
/* PLEASE, avoid to allocate new softirqs, if you need not _really_ high
frequency threaded job scheduling. For almost all the purposes