|
|
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:
1.1.1.2 ! root 16: #include <linux/dev/glue/glue.h>
! 17:
1.1 root 18: int bh_mask_count[32];
1.1.1.2 ! root 19: unsigned int bh_active = 0;
! 20: unsigned int bh_mask = 0;
1.1 root 21: void (*bh_base[32]) (void);
22:
23: void
24: linux_soft_intr (void)
25: {
1.1.1.2 ! root 26: unsigned int active;
! 27: unsigned int mask, left;
1.1 root 28: void (**bh) (void);
29:
30: sti ();
31: bh = bh_base;
32: active = bh_active & bh_mask;
33: for (mask = 1, left = ~0; left & active; bh++, mask += mask, left += left)
34: {
35: if (mask & active)
36: {
37: void (*fn) (void);
38: bh_active &= ~mask;
39: fn = *bh;
40: if (!fn)
41: goto bad_bh;
42: fn ();
43: }
44: }
45: return;
46: bad_bh:
1.1.1.2 ! root 47: printk ("linux_soft_intr:bad interrupt handler entry %08x\n", mask);
1.1 root 48: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.