Now with working on Leopard!

llvm-svn: 71819
This commit is contained in:
Owen Anderson 2009-05-15 00:01:40 +00:00
parent 923feac4e2
commit 509bb7423e
2 changed files with 3 additions and 3 deletions

View File

@ -28,7 +28,7 @@ void object_deleter(void *Ptr) {
/// ManagedStaticBase - Common base class for ManagedStatic instances.
class ManagedStaticBase {
protected:
sys::cas_flag InitFlag;
mutable sys::cas_flag InitFlag;
// This should only be used as a static variable, which guarantees that this
// will be zero initialized.

View File

@ -55,10 +55,10 @@ namespace llvm {
OSMemoryBarrier();
}
typedef volatile UInt32 cas_flag;
typedef volatile int32_t cas_flag;
inline cas_flag CompareAndSwap(cas_flag* dest, cas_flag exc, cas_flag c) {
cas_flag old = *dest;
OSCompareAndSwap(c, exc, dest);
OSAtomicCompareAndSwap32(c, exc, dest);
return old;
}
#elif defined(LLVM_ON_WIN32)