1 /* $Id: hardirq.h,v 1.5 1998/08/29 21:20:21 ralf Exp $
3 * This file is subject to the terms and conditions of the GNU General Public
4 * License. See the file "COPYING" in the main directory of this archive
7 * Copyright (C) 1997, 1998 by Ralf Baechle
9 #ifndef __ASM_MIPS_HARDIRQ_H
10 #define __ASM_MIPS_HARDIRQ_H
12 #include <linux/threads.h>
14 extern unsigned int local_irq_count
[NR_CPUS
];
17 * Are we in an interrupt context? Either doing bottom half
18 * or hardware interrupt processing?
20 #define in_interrupt() ({ int __cpu = smp_processor_id(); \
21 (local_irq_count[__cpu] + local_bh_count[__cpu] != 0); })
25 #define hardirq_trylock(cpu) (local_irq_count[cpu] == 0)
26 #define hardirq_endlock(cpu) do { } while (0)
28 #define hardirq_enter(cpu) (local_irq_count[cpu]++)
29 #define hardirq_exit(cpu) (local_irq_count[cpu]--)
31 #define synchronize_irq() barrier();
35 #error No habla MIPS SMP
38 #endif /* __ASM_MIPS_HARDIRQ_H */