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