But again, if you only have an atomic-sized memory location, and you bother writing an optimisation for atomic stuff, why bother with barriers when you could just perform an atomic update?
Also SeqCst is way overkill for a mutex, that is literally the use case for acquire and release semantics, the two barriers were named after the lock operation.
Also SeqCst is way overkill for a mutex, that is literally the use case for acquire and release semantics, the two barriers were named after the lock operation.