linux.conf.au, January 2003 PROGRAMMING: kernel/softirq.c /* * This function must run with irqs disabled! */ inline void cpu_raise_softirq(unsigned int cpu, unsigned int nr) { __cpu_raise_softirq(cpu, nr); /* * If we're in an interrupt or bh, we're done * (this also catches bh-disabled code). We will * actually run the softirq once we return from * the irq or bh. * * Otherwise we wake up ksoftirqd to make sure we * schedule the softirq soon. */ if (!in_interrupt()) wakeup_softirqd(cpu); } void raise_softirq(unsigned int nr) { long flags; local_irq_save(flags); cpu_raise_softirq(smp_processor_id(), nr); local_irq_restore(flags); }