mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-11 03:46:17 +01:00
fa4e34667c
Atomic APIs provide a way to exchange values only if we compare a value that is equal to the old value, but not to just exchange the value returning the old one. However, compilers provide such built-in functions, so we can use them to expose such functionality to GLib. The only drawback is that when using an old version of gcc not providing atomic APIs to swap values, we need to re-implement it with an implementation that may not be fully atomic, but that is safe enough. However this codepath should really not be used currently as gcc introduced __atomic_exchange_n() at version 4.7.4, so 8 years ago. |
||
---|---|---|
.. | ||
reference | ||
backports.md | ||
CODEOWNERS | ||
debugging.txt | ||
macros.txt | ||
meson-version.md | ||
rationales.md | ||
roadmap.md | ||
supported-platforms.md | ||
toolchain-requirements.md |