ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-2.6.6.tar.bz2
[linux-2.6.git] / include / asm-h8300 / softirq.h
1 #ifndef __ASM_SOFTIRQ_H
2 #define __ASM_SOFTIRQ_H
3
4 #include <linux/preempt.h>
5 #include <asm/hardirq.h>
6
7 #define local_bh_disable() \
8                 do { preempt_count() += SOFTIRQ_OFFSET; barrier(); } while (0)
9 #define __local_bh_enable() \
10                 do { barrier(); preempt_count() -= SOFTIRQ_OFFSET; } while (0)
11
12 #define local_bh_enable()                                               \
13 do {                                                                    \
14         __local_bh_enable();                                            \
15         if (unlikely(!in_interrupt() && softirq_pending(smp_processor_id()))) \
16                 do_softirq();                                           \
17         preempt_check_resched();                                        \
18 } while (0)
19
20 #endif  /* __ASM_SOFTIRQ_H */