root/kernel/softirq.c

/* [previous][next][first][last][top][bottom][index][help] */

DEFINITIONS

This source file includes following definitions.
  1. do_bottom_half

   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 INCLUDE_INLINE_FUNCS
  12 #include <linux/tqueue.h>
  13 
  14 #include <linux/ptrace.h>
  15 #include <linux/errno.h>
  16 #include <linux/kernel_stat.h>
  17 #include <linux/signal.h>
  18 #include <linux/sched.h>
  19 #include <linux/interrupt.h>
  20 #include <linux/mm.h>
  21 
  22 #include <asm/system.h>
  23 #include <asm/io.h>
  24 #include <asm/irq.h>
  25 #include <asm/bitops.h>
  26 
  27 
  28 unsigned long intr_count = 0;
  29 
  30 int bh_mask_count[32];
  31 unsigned long bh_active = 0;
  32 unsigned long bh_mask = 0;
  33 void (*bh_base[32])(void);
  34 
  35 
  36 asmlinkage void do_bottom_half(void)
     /* [previous][next][first][last][top][bottom][index][help] */
  37 {
  38         unsigned long active;
  39         unsigned long mask, left;
  40         void (**bh)(void);
  41 
  42         bh = bh_base;
  43         active = bh_active & bh_mask;
  44         for (mask = 1, left = ~0 ; left & active ; bh++,mask += mask,left += left) {
  45                 if (mask & active) {
  46                         void (*fn)(void);
  47                         bh_active &= ~mask;
  48                         fn = *bh;
  49                         if (!fn)
  50                                 goto bad_bh;
  51                         fn();
  52                 }
  53         }
  54         return;
  55 bad_bh:
  56         printk ("irq.c:bad bottom half entry %08lx\n", mask);
  57 }

/* [previous][next][first][last][top][bottom][index][help] */