patch-2.3.30 linux/include/asm-alpha/hardirq.h
Next file: linux/include/asm-alpha/hw_irq.h
Previous file: linux/include/asm-alpha/fpu.h
Back to the patch index
Back to the overall index
- Lines: 44
- Date:
Mon Dec 6 17:15:53 1999
- Orig file:
v2.3.29/linux/include/asm-alpha/hardirq.h
- Orig date:
Fri Sep 10 23:57:36 1999
diff -u --recursive --new-file v2.3.29/linux/include/asm-alpha/hardirq.h linux/include/asm-alpha/hardirq.h
@@ -28,8 +28,8 @@
#define hardirq_trylock(cpu) (local_irq_count(cpu) == 0)
#define hardirq_endlock(cpu) ((void) 0)
-#define hardirq_enter(cpu, irq) (local_irq_count(cpu)++)
-#define hardirq_exit(cpu, irq) (local_irq_count(cpu)--)
+#define irq_enter(cpu, irq) (local_irq_count(cpu)++)
+#define irq_exit(cpu, irq) (local_irq_count(cpu)--)
#define synchronize_irq() barrier()
@@ -52,13 +52,16 @@
}
}
-static inline void hardirq_enter(int cpu, int irq)
+static inline void irq_enter(int cpu, int irq)
{
++local_irq_count(cpu);
atomic_inc(&global_irq_count);
+
+ while (spin_is_locked(&global_irq_lock))
+ barrier();
}
-static inline void hardirq_exit(int cpu, int irq)
+static inline void irq_exit(int cpu, int irq)
{
atomic_dec(&global_irq_count);
--local_irq_count(cpu);
@@ -66,11 +69,10 @@
static inline int hardirq_trylock(int cpu)
{
- return (!atomic_read(&global_irq_count)
- && !spin_is_locked(&global_irq_lock));
+ return !local_irq_count(cpu) && !spin_is_locked(&global_irq_lock);
}
-#define hardirq_endlock(cpu) ((void)0)
+#define hardirq_endlock(cpu) do { } while (0)
extern void synchronize_irq(void);
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)