2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
6 * Copyright (C) 1997, 1998, 1999, 2000, 2001 by Ralf Baechle
7 * Copyright (C) 1999, 2000 Silicon Graphics, Inc.
8 * Copyright (C) 2001 MIPS Technologies, Inc.
10 #ifndef _ASM_SOFTIRQ_H
11 #define _ASM_SOFTIRQ_H
13 #include <asm/atomic.h>
14 #include <asm/hardirq.h>
16 static inline void cpu_bh_disable(int cpu)
18 local_bh_count(cpu)++;
22 static inline void __cpu_bh_enable(int cpu)
25 local_bh_count(cpu)--;
28 #define local_bh_disable() cpu_bh_disable(smp_processor_id())
29 #define __local_bh_enable() __cpu_bh_enable(smp_processor_id())
30 #define local_bh_enable() \
35 cpu = smp_processor_id(); \
36 if (!--local_bh_count(cpu) && softirq_pending(cpu)) \
40 #define in_softirq() (local_bh_count(smp_processor_id()) != 0)
42 #endif /* _ASM_SOFTIRQ_H */