By: Gabriele Svelto (gabriele.svelto.delete@this.gmail.com), December 9, 2014 7:31 am
Room: Moderated Discussions
Konrad Schwarz (no.spam.delete@this.no.spam) on December 9, 2014 5:12 am wrote:
> Whic guarantees of a mutex are
> not provided by atomics with acquire/release semantics,
> such that a mutex should require more heavyweight instructions?
A mutex enforces sequential consistency, i.e. it must ensure that loads from within the section protected by the mutex are not reordered ahead of stores from outside of it. Acquire/release semantics are insufficient to guarantee this.
> Whic guarantees of a mutex are
> not provided by atomics with acquire/release semantics,
> such that a mutex should require more heavyweight instructions?
A mutex enforces sequential consistency, i.e. it must ensure that loads from within the section protected by the mutex are not reordered ahead of stores from outside of it. Acquire/release semantics are insufficient to guarantee this.