patch-2.3.4 linux/include/asm-i386/softirq.h
Next file: linux/include/asm-i386/spinlock.h
Previous file: linux/include/asm-i386/processor.h
Back to the patch index
Back to the overall index
- Lines: 24
- Date:
Fri May 28 09:19:24 1999
- Orig file:
v2.3.3/linux/include/asm-i386/softirq.h
- Orig date:
Tue May 11 13:04:00 1999
diff -u --recursive --new-file v2.3.3/linux/include/asm-i386/softirq.h linux/include/asm-i386/softirq.h
@@ -40,6 +40,13 @@
extern void synchronize_bh(void);
+/*
+ * This is suboptimal. We only need to disable bh's locally
+ * on this CPU...
+ */
+#define local_bh_disable() atomic_inc(&global_bh_lock)
+#define local_bh_enable() atomic_dec(&global_bh_lock)
+
static inline void start_bh_atomic(void)
{
atomic_inc(&global_bh_lock);
@@ -83,6 +90,9 @@
barrier();
local_bh_count[smp_processor_id()]--;
}
+
+#define local_bh_disable() (local_bh_count[smp_processor_id()]++)
+#define local_bh_enable() (local_bh_count[smp_processor_id()]--)
/* These are for the irq's testing the lock */
#define softirq_trylock(cpu) (local_bh_count[cpu] ? 0 : (local_bh_count[cpu]=1))
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)