patch-2.3.4 linux/include/asm-i386/system.h
Next file: linux/include/asm-m68k/processor.h
Previous file: linux/include/asm-i386/spinlock.h
Back to the patch index
Back to the overall index
- Lines: 12
- Date:
Tue May 25 14:56:58 1999
- Orig file:
v2.3.3/linux/include/asm-i386/system.h
- Orig date:
Tue May 11 13:03:58 1999
diff -u --recursive --new-file v2.3.3/linux/include/asm-i386/system.h linux/include/asm-i386/system.h
@@ -181,6 +181,11 @@
#define __restore_flags(x) \
__asm__ __volatile__("pushl %0 ; popfl": /* no output */ :"g" (x):"memory")
+/* For spinlocks etc */
+#define local_irq_save(x) __asm__ __volatile__("pushfl ; popl %0 ; cli":"=g" (x): /* no input */ :"memory")
+#define local_irq_restore(x) __asm__ __volatile__("pushl %0 ; popfl": /* no output */ :"g" (x):"memory")
+#define local_irq_disable() __asm__ __volatile__("cli": : :"memory")
+#define local_irq_enable() __asm__ __volatile__("sti": : :"memory")
#ifdef __SMP__
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)