Use relaxed memory ordering for initializing atomic_flags
This commit is contained in:
parent
e104f580b3
commit
05cdc2cb30
@ -2312,7 +2312,7 @@ static DeviceRef VerifyDevice(ALCdevice *device)
|
|||||||
|
|
||||||
ALCcontext::ALCcontext(ALCdevice *device) : Device{device}
|
ALCcontext::ALCcontext(ALCdevice *device) : Device{device}
|
||||||
{
|
{
|
||||||
PropsClean.test_and_set();
|
PropsClean.test_and_set(std::memory_order_relaxed);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* InitContext
|
/* InitContext
|
||||||
|
@ -113,7 +113,7 @@ struct ALeffectslot {
|
|||||||
*/
|
*/
|
||||||
alignas(16) ALfloat WetBuffer[MAX_EFFECT_CHANNELS][BUFFERSIZE];
|
alignas(16) ALfloat WetBuffer[MAX_EFFECT_CHANNELS][BUFFERSIZE];
|
||||||
|
|
||||||
ALeffectslot() { PropsClean.test_and_set(); }
|
ALeffectslot() { PropsClean.test_and_set(std::memory_order_relaxed); }
|
||||||
ALeffectslot(const ALeffectslot&) = delete;
|
ALeffectslot(const ALeffectslot&) = delete;
|
||||||
ALeffectslot& operator=(const ALeffectslot&) = delete;
|
ALeffectslot& operator=(const ALeffectslot&) = delete;
|
||||||
~ALeffectslot();
|
~ALeffectslot();
|
||||||
|
@ -51,7 +51,7 @@ struct ALlistener {
|
|||||||
DistanceModel mDistanceModel;
|
DistanceModel mDistanceModel;
|
||||||
} Params;
|
} Params;
|
||||||
|
|
||||||
ALlistener() { PropsClean.test_and_set(); }
|
ALlistener() { PropsClean.test_and_set(std::memory_order_relaxed); }
|
||||||
};
|
};
|
||||||
|
|
||||||
void UpdateListenerProps(ALCcontext *context);
|
void UpdateListenerProps(ALCcontext *context);
|
||||||
|
@ -3352,9 +3352,9 @@ ALsource::ALsource(ALsizei num_sends)
|
|||||||
|
|
||||||
queue = nullptr;
|
queue = nullptr;
|
||||||
|
|
||||||
VoiceIdx = -1;
|
PropsClean.test_and_set(std::memory_order_relaxed);
|
||||||
|
|
||||||
PropsClean.test_and_set();
|
VoiceIdx = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
ALsource::~ALsource()
|
ALsource::~ALsource()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user