ma_slot_allocator_free: use atomic load on allocator count

Signed-off-by: Steven Noonan <steven@uplinklabs.net>
This commit is contained in:
Steven Noonan
2021-08-17 18:29:41 -07:00
committed by David Reid
parent 0c22f75ef7
commit 86029cde7c
+1 -1
View File
@@ -38986,7 +38986,7 @@ MA_API ma_result ma_slot_allocator_free(ma_slot_allocator* pAllocator, ma_uint64
MA_ASSERT(iBit < 32); /* This must be true due to the logic we used to actually calculate it. */
while (pAllocator->count > 0) {
while (c89atomic_load_i32(&pAllocator->count) > 0) {
/* CAS */
ma_uint32 oldBitfield;
ma_uint32 newBitfield;