patch-2.1.31 linux/include/linux/interrupt.h

Next file: linux/include/linux/ipx.h
Previous file: linux/include/linux/fs.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.30/linux/include/linux/interrupt.h linux/include/linux/interrupt.h
@@ -3,8 +3,10 @@
 #define _LINUX_INTERRUPT_H
 
 #include <linux/kernel.h>
+
 #include <asm/bitops.h>
 #include <asm/atomic.h>
+#include <asm/hardirq.h>
 
 struct irqaction {
 	void (*handler)(int, void *, struct pt_regs *);
@@ -77,15 +79,24 @@
  */
 extern inline void start_bh_atomic(void)
 {
+#ifdef __SMP__
 	cli();
 	atomic_inc(&intr_count);
 	sti();
+#else
+	intr_count++;
+	barrier();
+#endif
 }
 
 extern inline void end_bh_atomic(void)
 {
-	barrier();
+#ifdef __SMP__
 	atomic_dec(&intr_count);
+#else
+	barrier();
+	intr_count--;
+#endif
 }
 
 /*

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