0.pre8.33
[sbcl.git] / src / runtime / x86-arch.c
index 9b51cc0..2b03d7a 100644 (file)
@@ -141,6 +141,18 @@ arch_install_breakpoint(void *pc)
     return result;
 }
 
+void 
+get_spinlock(lispobj *word,int value)
+{
+    u32 eax=0;
+    do {
+       asm ("xor %0,%0;cmpxchg %1,%2" 
+            : "=a" (eax)
+            : "r" (value), "m" (*word)
+            : "memory", "cc");
+    } while(eax!=0);
+}
+
 void
 arch_remove_breakpoint(void *pc, unsigned long orig_inst)
 {