Edit

kc3-lang/SDL/src/atomic

Branch :

  • Show log

    Commit

  • Author : Cameron Gutman
    Date : 2021-01-03 12:13:40
    Hash : 014f507c
    Message : Use specific acquire and release variants of InterlockedExchange on ARM _InterlockedExchange_rel() is required for correctness on ARM because the _ReadWriteBarrier() macro is only a compiler memory barrier, not a hardware memory barrier. Due to ARM's relaxed memory model, this means the '*lock = 0' write may be observed before the operations inside the lock, causing possible corruption of data protected by the lock. _InterlockedExchange_acq() is more efficient on ARM because it avoids an expensive full memory barrier that _InterlockedExchange() does.