1 #ifndef __ASM_SH_SOFTIRQ_H
2 #define __ASM_SH_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 	barrier();					\
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_SH_SOFTIRQ_H */
31