patch-2.1.87 linux/include/asm-m68k/softirq.h

Next file: linux/include/asm-m68k/system.h
Previous file: linux/include/asm-m68k/socket.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.86/linux/include/asm-m68k/softirq.h linux/include/asm-m68k/softirq.h
@@ -44,22 +44,22 @@
 	bh_mask &= ~(1 << nr);
 }
 
-extern int __m68k_bh_counter;
+extern unsigned int local_bh_count[NR_CPUS];
 
 extern inline void start_bh_atomic(void)
 {
-	__m68k_bh_counter++;
+	local_bh_count[smp_processor_id()]++;
 	barrier();
 }
 
 extern inline void end_bh_atomic(void)
 {
 	barrier();
-	__m68k_bh_counter--;
+	local_bh_count[smp_processor_id()]--;
 }
 
 /* These are for the irq's testing the lock */
-#define softirq_trylock()  (__m68k_bh_counter ? 0 : (__m68k_bh_counter=1))
-#define softirq_endlock()  (__m68k_bh_counter = 0)
+#define softirq_trylock(cpu)  (local_bh_count[cpu] ? 0 : (local_bh_count[cpu]=1))
+#define softirq_endlock(cpu)  (local_bh_count[cpu] = 0)
 
 #endif

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