Import 2.3.18pre1
[davej-history.git] / include / asm-sh / hardirq.h
blob1957bb7b088c9971a0f5e5fedc72901b9b330e6f
1 #ifndef __ASM_SH_HARDIRQ_H
2 #define __ASM_SH_HARDIRQ_H
4 #include <linux/threads.h>
6 extern unsigned int local_irq_count[NR_CPUS];
7 #define in_interrupt() (local_irq_count[smp_processor_id()] != 0)
9 #ifndef __SMP__
11 #define hardirq_trylock(cpu) (local_irq_count[cpu] == 0)
12 #define hardirq_endlock(cpu) do { } while (0)
14 #define hardirq_enter(cpu) (local_irq_count[cpu]++)
15 #define hardirq_exit(cpu) (local_irq_count[cpu]--)
17 #define synchronize_irq() do { } while (0)
19 #else
21 #error Super-H SMP is not available
23 #endif /* __SMP__ */
24 #endif /* __ASM_SH_HARDIRQ_H */