[redcode/crythread-2nd-pass] replaced remaining CryInterlocked* usage with equivalent AZStd version

Signed-off-by: AMZN-ScottR <24445312+AMZN-ScottR@users.noreply.github.com>
This commit is contained in:
AMZN-ScottR
2021-08-11 15:57:49 -07:00
parent 5a891c8cbd
commit 337ea488b6
3 changed files with 20 additions and 26 deletions
@@ -153,7 +153,7 @@ namespace Audio
///////////////////////////////////////////////////////////////////////////////////////////////////
void SAudioRequestDataInternal::Release()
{
const int nCount = CryInterlockedDecrement(&m_nRefCounter);
const int nCount = m_nRefCounter.fetch_sub(1, AZStd::memory_order_acq_rel) - 1; // because we get the original value back
AZ_Assert(nCount >= 0, "AudioRequests Release - Decremented reference counter too many times!");
if (nCount == 0)