mirror of
https://github.com/taglib/taglib.git
synced 2025-06-04 01:28:21 -04:00
Use the memory barrier variants on OS X
This commit is contained in:
parent
223b85d345
commit
41f1828719
@ -99,8 +99,8 @@ namespace TagLib {
|
||||
RefCounter() : refCount(1) {}
|
||||
|
||||
#ifdef TAGLIB_ATOMIC_MAC
|
||||
void ref() { OSAtomicIncrement32(&refCount); }
|
||||
bool deref() { return ! OSAtomicDecrement32(&refCount); }
|
||||
void ref() { OSAtomicIncrement32Barrier(&refCount); }
|
||||
bool deref() { return ! OSAtomicDecrement32Barrier(&refCount); }
|
||||
int32_t count() { return refCount; }
|
||||
private:
|
||||
volatile int32_t refCount;
|
||||
|
Loading…
x
Reference in New Issue
Block a user