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 unsigned long bh_active = 0;
  31 unsigned long bh_mask = 0;
  32 struct bh_struct bh_base[32];
  33 
  34 
  35 asmlinkage void do_bottom_half(void)
     /* [previous][next][first][last][top][bottom][index][help] */
  36 {
  37         unsigned long active;
  38         unsigned long mask, left;
  39         struct bh_struct *bh;
  40 
  41         bh = bh_base;
  42         active = bh_active & bh_mask;
  43         for (mask = 1, left = ~0 ; left & active ; bh++,mask += mask,left += left) {
  44                 if (mask & active) {
  45                         void (*fn)(void *);
  46                         bh_active &= ~mask;
  47                         fn = bh->routine;
  48                         if (!fn)
  49                                 goto bad_bh;
  50                         fn(bh->data);
  51                 }
  52         }
  53         return;
  54 bad_bh:
  55         printk ("irq.c:bad bottom half entry %08lx\n", mask);
  56 }

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