Fix potential data race in mutex lock implementation.
Writing or reading an ordinary volatile boolean does not provide memory
ordering guarantees. Use atomic<bool> with release and acquire semantics
instead. On x86 this should have no impact on the generated code, since
it architecturally offers strong memory ordering guarantees.
Bug chromium:710753
Change-Id: I5aa2a6eeecfcd691a0aa8d06fd067f9d59ab13c3
Reviewed-on: https://swiftshader-review.googlesource.com/9328Reviewed-by:
Corentin Wallez <cwallez@google.com>
Reviewed-by:
Nicolas Capens <capn@google.com>
Tested-by:
Nicolas Capens <capn@google.com>
Showing
Please
register
or
sign in
to comment