mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-04-20 15:25:33 +02:00
97c154791b20844026bd7469f56d13af7f0973d7
__sync_lock_test_and_set() is designed for creating locks, not as
a general atomic exchange function. As a result, it only provides
an acquire memory barrier and isn't guaranteed to actually store
the provided value (though it does on architectures we care about).
__atomic_exchange_n() is supported on GCC/Clang for the last ~10
years, so let's use that instead if available. We will keep the
__sync_lock_test_and_set() fallback around for ancient platforms,
but add a full memory barrier to match the documented behavior.
(cherry picked from commit 509a36db16)
Simple DirectMedia Layer (SDL for short) is a cross-platform library designed to make it easy to write multi-media software, such as games and emulators.
You can find the latest release and additional information at: https://www.libsdl.org/
Installation instructions and a quick introduction is available in INSTALL.md
This library is distributed under the terms of the zlib license, available in LICENSE.txt.
Enjoy!
Sam Lantinga (slouken@libsdl.org)
Languages
C
85.7%
C++
6.6%
Objective-C
3.4%
CMake
1.6%
Perl
0.7%
Other
1.7%