Skip to content
Commit db0e43d2 authored by Allison Karlitskaya's avatar Allison Karlitskaya
Browse files

gatomic: use GCC C11-style atomics, if available

GCC does not yet support ISO C11 atomic operations, but it has
compatible versions available as an extension.  Use these for load and
store if they are available in order to avoid emitting a hard fence
instruction (since in many cases, we do not need it -- on x86, for
example).

For now we use the fully seqentially-consistent memory model, since
these APIs are documented rather explicitly: "This call acts as a full
compiler and hardware memory barrier".

In the future we can consider introducing new APIs for the more relaxed
memory models, if they are available (or fall back to stricter ones
otherwise).

https://bugzilla.gnome.org/show_bug.cgi?id=730807
parent 875eeb2c
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment