patch-2.3.16 linux/include/asm-sh/hardirq.h
Next file: linux/include/asm-sh/hw_irq.h
Previous file: linux/include/asm-sh/fcntl.h
Back to the patch index
Back to the overall index
- Lines: 25
- Date:
Mon Aug 30 18:12:59 1999
- Orig file:
v2.3.15/linux/include/asm-sh/hardirq.h
- Orig date:
Wed Dec 31 16:00:00 1969
diff -u --recursive --new-file v2.3.15/linux/include/asm-sh/hardirq.h linux/include/asm-sh/hardirq.h
@@ -0,0 +1,24 @@
+#ifndef __ASM_SH_HARDIRQ_H
+#define __ASM_SH_HARDIRQ_H
+
+#include <linux/threads.h>
+
+extern unsigned int local_irq_count[NR_CPUS];
+#define in_interrupt() (local_irq_count[smp_processor_id()] != 0)
+
+#ifndef __SMP__
+
+#define hardirq_trylock(cpu) (local_irq_count[cpu] == 0)
+#define hardirq_endlock(cpu) do { } while (0)
+
+#define hardirq_enter(cpu) (local_irq_count[cpu]++)
+#define hardirq_exit(cpu) (local_irq_count[cpu]--)
+
+#define synchronize_irq() do { } while (0)
+
+#else
+
+#error Super-H SMP is not available
+
+#endif /* __SMP__ */
+#endif /* __ASM_SH_HARDIRQ_H */
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)