0.8.3.1
[sbcl/lichteblau.git] / src / runtime / x86-arch.h
blob19d6cf6aa446ba74d8b0aab5b355f756cc88af5d
1 /* FIXME: Aren't preprocessor symbols with underscore prefixes
2 * reserved for the system libraries? If so, it would be tidy to
3 * rename flags like _X86_ARCH_H so their names are in a part of the
4 * namespace that we control. */
5 #ifndef _X86_ARCH_H
6 #define _X86_ARCH_H
8 #define ARCH_HAS_STACK_POINTER
10 /* FIXME: Do we also want
11 * #define ARCH_HAS_FLOAT_REGISTERS
12 * here? (The answer wasn't obvious to me when merging the
13 * architecture-abstracting patches for CSR's SPARC port. -- WHN 2002-02-15) */
15 static inline void
16 get_spinlock(lispobj *word,int value)
18 u32 eax=0;
19 do {
20 asm ("xor %0,%0\n\
21 lock cmpxchg %1,%2"
22 : "=a" (eax)
23 : "r" (value), "m" (*word)
24 : "memory", "cc");
25 } while(eax!=0);
28 static inline void
29 release_spinlock(lispobj *word)
31 *word=0;
34 #endif /* _X86_ARCH_H */