|
|
1.1 root 1: /*
2: * linux/kernel/softirq.c
3: *
4: * Copyright (C) 1992 Linus Torvalds
5: *
6: * do_bottom_half() runs at normal kernel priority: all interrupts
7: * enabled. do_bottom_half() is atomic with respect to itself: a
8: * bottom_half handler need not be re-entrant.
9: */
10:
11: #define MACH_INCLUDE
12: #include <linux/ptrace.h>
13: #include <linux/interrupt.h>
14: #include <asm/system.h>
15:
16: int bh_mask_count[32];
17: unsigned long bh_active = 0;
18: unsigned long bh_mask = 0;
19: void (*bh_base[32]) (void);
20:
21: void
22: linux_soft_intr (void)
23: {
24: unsigned long active;
25: unsigned long mask, left;
26: void (**bh) (void);
27:
28: sti ();
29: bh = bh_base;
30: active = bh_active & bh_mask;
31: for (mask = 1, left = ~0; left & active; bh++, mask += mask, left += left)
32: {
33: if (mask & active)
34: {
35: void (*fn) (void);
36: bh_active &= ~mask;
37: fn = *bh;
38: if (!fn)
39: goto bad_bh;
40: fn ();
41: }
42: }
43: return;
44: bad_bh:
45: printk ("linux_soft_intr:bad interrupt handler entry %08lx\n", mask);
46: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.