mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-12 17:32:19 +00:00
Now with working on Leopard!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71819 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
9bea7c85d7
commit
5f00b0c5b6
@ -28,7 +28,7 @@ void object_deleter(void *Ptr) {
|
|||||||
/// ManagedStaticBase - Common base class for ManagedStatic instances.
|
/// ManagedStaticBase - Common base class for ManagedStatic instances.
|
||||||
class ManagedStaticBase {
|
class ManagedStaticBase {
|
||||||
protected:
|
protected:
|
||||||
sys::cas_flag InitFlag;
|
mutable sys::cas_flag InitFlag;
|
||||||
|
|
||||||
// This should only be used as a static variable, which guarantees that this
|
// This should only be used as a static variable, which guarantees that this
|
||||||
// will be zero initialized.
|
// will be zero initialized.
|
||||||
|
@ -55,10 +55,10 @@ namespace llvm {
|
|||||||
OSMemoryBarrier();
|
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) {
|
inline cas_flag CompareAndSwap(cas_flag* dest, cas_flag exc, cas_flag c) {
|
||||||
cas_flag old = *dest;
|
cas_flag old = *dest;
|
||||||
OSCompareAndSwap(c, exc, dest);
|
OSAtomicCompareAndSwap32(c, exc, dest);
|
||||||
return old;
|
return old;
|
||||||
}
|
}
|
||||||
#elif defined(LLVM_ON_WIN32)
|
#elif defined(LLVM_ON_WIN32)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user