Use relaxed memory ordering for initializing atomic_flags

This commit is contained in:
Chris Robinson 2019-02-04 21:28:37 -08:00
parent e104f580b3
commit 05cdc2cb30
4 changed files with 5 additions and 5 deletions

View File

@ -2312,7 +2312,7 @@ static DeviceRef VerifyDevice(ALCdevice *device)
ALCcontext::ALCcontext(ALCdevice *device) : Device{device}
{
PropsClean.test_and_set();
PropsClean.test_and_set(std::memory_order_relaxed);
}
/* InitContext

View File

@ -113,7 +113,7 @@ struct ALeffectslot {
*/
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& operator=(const ALeffectslot&) = delete;
~ALeffectslot();

View File

@ -51,7 +51,7 @@ struct ALlistener {
DistanceModel mDistanceModel;
} Params;
ALlistener() { PropsClean.test_and_set(); }
ALlistener() { PropsClean.test_and_set(std::memory_order_relaxed); }
};
void UpdateListenerProps(ALCcontext *context);

View File

@ -3352,9 +3352,9 @@ ALsource::ALsource(ALsizei num_sends)
queue = nullptr;
VoiceIdx = -1;
PropsClean.test_and_set(std::memory_order_relaxed);
PropsClean.test_and_set();
VoiceIdx = -1;
}
ALsource::~ALsource()