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

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

diff -u --recursive --new-file v2.1.30/linux/include/asm-alpha/softirq.h linux/include/asm-alpha/softirq.h
@@ -0,0 +1,35 @@
+#ifndef _ALPHA_SOFTIRQ_H
+#define _ALPHA_SOFTIRQ_H
+
+/*
+ * Software interrupts..
+ */
+#define get_active_bhs()	(bh_mask & bh_active)
+
+static inline void clear_active_bhs(unsigned long x)
+{
+	unsigned long temp;
+	__asm__ __volatile__(
+	"1:	ldq_l %0,%1\n"
+	"	and %0,%2,%0\n"
+	"	stq_c %0,%1\n"
+	"	beq %0,2f\n"
+	".text 2\n"
+	"2:	br 1b\n"
+	".text"
+	:"=&r" (temp), "=m" (bh_active)
+	:"Ir" (x), "m" (bh_active));
+}
+
+#ifndef __SMP__
+
+/* These are for the irq's testing the lock */
+#define softirq_trylock()	(intr_count ? 0 : ((intr_count=1),1))
+#define softirq_endlock()	(intr_count = 0)
+
+#else
+
+#error FIXME
+
+#endif /* __SMP__ */
+#endif /* _ALPHA_SOFTIRQ_H */

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