summaryrefslogtreecommitdiffstats
path: root/include/linux/interrupt.h
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>1994-11-28 11:59:19 +0000
committer <ralf@linux-mips.org>1994-11-28 11:59:19 +0000
commit1513ff9b7899ab588401c89db0e99903dbf5f886 (patch)
treef69cc81a940a502ea23d664c3ffb2d215a479667 /include/linux/interrupt.h
Import of Linus's Linux 1.1.68
Diffstat (limited to 'include/linux/interrupt.h')
-rw-r--r--include/linux/interrupt.h42
1 files changed, 42 insertions, 0 deletions
diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h
new file mode 100644
index 000000000..2ccaec523
--- /dev/null
+++ b/include/linux/interrupt.h
@@ -0,0 +1,42 @@
+/* interrupt.h */
+#ifndef _LINUX_INTERRUPT_H
+#define _LINUX_INTERRUPT_H
+
+struct bh_struct {
+ void (*routine)(void *);
+ void *data;
+};
+
+extern unsigned long bh_active;
+extern unsigned long bh_mask;
+extern struct bh_struct bh_base[32];
+
+/* Who gets which entry in bh_base. Things which will occur most often
+ should come first - in which case NET should be up the top with SERIAL/TQUEUE! */
+
+enum {
+ TIMER_BH = 0,
+ CONSOLE_BH,
+ TQUEUE_BH,
+ SERIAL_BH,
+ NET_BH,
+ IMMEDIATE_BH,
+ KEYBOARD_BH
+};
+
+extern inline void mark_bh(int nr)
+{
+ __asm__ __volatile__("orl %1,%0":"=m" (bh_active):"ir" (1<<nr));
+}
+
+extern inline void disable_bh(int nr)
+{
+ __asm__ __volatile__("andl %1,%0":"=m" (bh_mask):"ir" (~(1<<nr)));
+}
+
+extern inline void enable_bh(int nr)
+{
+ __asm__ __volatile__("orl %1,%0":"=m" (bh_mask):"ir" (1<<nr));
+}
+
+#endif