debuggers.hg

view xen/common/softirq.c @ 3705:4294cfa9fad3

bitkeeper revision 1.1159.212.95 (4204aa0ee0re5Xx1zWrJ9ejxzgRs3w)

Various cleanups. Remove PDB pending simpler GDB stub and/or NetBSD debugger.
Force emacs mode to appropriate tabbing in various files.
Signed-off-by: keir.fraser@cl.cam.ac.uk
author kaf24@scramble.cl.cam.ac.uk
date Sat Feb 05 11:12:14 2005 +0000 (2005-02-05)
parents 610068179f96
children 88957a238191
line source
1 /* -*- Mode:C; c-basic-offset:4; tab-width:4; indent-tabs-mode:nil -*- */
2 /******************************************************************************
3 * common/softirq.c
4 *
5 * Softirqs in Xen are only executed in an outermost activation (e.g., never
6 * within an interrupt activation). This simplifies some things and generally
7 * seems a good thing.
8 *
9 * Copyright (c) 2003, K A Fraser
10 * Copyright (c) 1992, Linus Torvalds
11 */
13 #include <xen/config.h>
14 #include <xen/init.h>
15 #include <xen/mm.h>
16 #include <xen/sched.h>
17 #include <xen/softirq.h>
19 #ifndef __ARCH_IRQ_STAT
20 irq_cpustat_t irq_stat[NR_CPUS];
21 #endif
23 static softirq_handler softirq_handlers[NR_SOFTIRQS];
25 asmlinkage void do_softirq()
26 {
27 unsigned int i, pending, cpu = smp_processor_id();
29 pending = softirq_pending(cpu);
30 ASSERT(pending != 0);
32 do {
33 i = find_first_set_bit(pending);
34 clear_bit(i, &softirq_pending(cpu));
35 (*softirq_handlers[i])();
36 } while ( (pending = softirq_pending(cpu)) != 0 );
37 }
39 void open_softirq(int nr, softirq_handler handler)
40 {
41 softirq_handlers[nr] = handler;
42 }