1 #ifndef __ASM_SOFTIRQ_H 2 #define __ASM_SOFTIRQ_H 3 4 #include <asm/atomic.h> 5 #include <asm/hardirq.h> 6 7 #define local_bh_disable() \ 8 do { \ 9 local_bh_count(smp_processor_id())++; \ 10 barrier(); \ 11 } while (0) 12 13 #define __local_bh_enable() \ 14 do { \ 15 barrier(); \ 16 local_bh_count(smp_processor_id())--; \ 17 } while (0) 18 19 #define local_bh_enable() \ 20 do { \ 21 if (!--local_bh_count(smp_processor_id()) \ 22 && softirq_pending(smp_processor_id())) { \ 23 do_softirq(); \ 24 __sti(); \ 25 } \ 26 } while (0) 27 28 #define in_softirq() (local_bh_count(smp_processor_id()) != 0) 29 30 #endif /* __ASM_SOFTIRQ_H */ 31