1#ifndef __ASM_SOFTIRQ_H
2#define __ASM_SOFTIRQ_H
3
4/*
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License
7 * as published by the Free Software Foundation; either version
8 * 2 of the License, or (at your option) any later version.
9 */
10
11#include <asm/hardirq.h>
12
13#define local_bh_disable()	do { local_bh_count(smp_processor_id())++; barrier(); } while (0)
14#define __local_bh_enable()	do { barrier(); local_bh_count(smp_processor_id())--; } while (0)
15
16#define local_bh_enable()  \
17do {                                                    \
18	barrier();					\
19        if (!--local_bh_count(smp_processor_id())       \
20            && softirq_pending(smp_processor_id())) {   \
21                do_softirq();                           \
22        }                                               \
23} while (0)
24
25#define in_softirq() (local_bh_count(smp_processor_id()) != 0)
26
27#endif	/* __ASM_SOFTIRQ_H */
28