|
|
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: #include <linux/ptrace.h> ! 12: #include <linux/errno.h> ! 13: #include <linux/kernel_stat.h> ! 14: #include <linux/signal.h> ! 15: #include <linux/sched.h> ! 16: #include <linux/interrupt.h> ! 17: #include <linux/mm.h> ! 18: ! 19: #include <asm/system.h> ! 20: #include <asm/io.h> ! 21: #include <asm/irq.h> ! 22: #include <asm/bitops.h> ! 23: ! 24: unsigned long intr_count = 0; ! 25: ! 26: int bh_mask_count[32]; ! 27: unsigned long bh_active = 0; ! 28: unsigned long bh_mask = 0; ! 29: void (*bh_base[32])(void); ! 30: ! 31: ! 32: asmlinkage void do_bottom_half(void) ! 33: { ! 34: unsigned long active; ! 35: unsigned long mask, left; ! 36: void (**bh)(void); ! 37: ! 38: sti(); ! 39: bh = bh_base; ! 40: active = bh_active & bh_mask; ! 41: for (mask = 1, left = ~0 ; left & active ; bh++,mask += mask,left += left) { ! 42: if (mask & active) { ! 43: void (*fn)(void); ! 44: bh_active &= ~mask; ! 45: fn = *bh; ! 46: if (!fn) ! 47: goto bad_bh; ! 48: fn(); ! 49: } ! 50: } ! 51: return; ! 52: bad_bh: ! 53: printk ("irq.c:bad bottom half entry %08lx\n", mask); ! 54: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.