patch-2.1.31 linux/include/asm-alpha/hardirq.h

Next file: linux/include/asm-alpha/smp_lock.h
Previous file: linux/include/asm-alpha/bitops.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.30/linux/include/asm-alpha/hardirq.h linux/include/asm-alpha/hardirq.h
@@ -0,0 +1,20 @@
+#ifndef _ALPHA_HARDIRQ_H
+#define _ALPHA_HARDIRQ_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)	((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]--)
+
+#else
+
+#error FIXME
+
+#endif /* __SMP__ */
+#endif /* _ALPHA_HARDIRQ_H */

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov