Commit Graph

20 Commits

Author SHA1 Message Date
Sam Lantinga
5e13087b0f Updated copyright for 2019 2019-01-04 22:01:14 -08:00
Ozkan Sezer
d9fb77a3c1 SDL_atomic.c, SDL_spinlock.c: use lock prefix with xchg in Watcom asm. 2018-09-27 11:55:02 +03:00
Ozkan Sezer
949b8bd8c5 correct the comment correction.. 2018-06-30 20:10:40 +03:00
Ozkan Sezer
67f18a1973 comment correction 2018-06-30 20:04:01 +03:00
Ryan C. Gordon
52857de251 Corrected a comment. 2018-06-29 16:55:55 -04:00
Ryan C. Gordon
3b173f818d Patched to compile on Visual Studio (typo). 2018-06-25 23:00:38 -04:00
Ryan C. Gordon
58168a8c3c atomic: Fight with all the assemblers that don't like REP NOP. :/ 2018-06-25 16:34:16 -04:00
Ryan C. Gordon
5f123e31a3 atomic: Spin locks now try to use the x86 PAUSE instruction for short waits.
Fixes Bugzilla #4151.
2018-06-25 15:58:35 -04:00
Sam Lantinga
e3cc5b2c6b Updated copyright for 2018 2018-01-03 10:03:25 -08:00
Ozkan Sezer
500378eb52 Add atomics for Watcom/x86 as inline asm
Partially fixes Bugzilla #3758.
2017-08-18 16:35:55 -04:00
Ryan C. Gordon
1d1a0d7f03 atomic: Patched to compile on Android. 2017-04-13 15:28:56 -04:00
Ryan C. Gordon
1c9c7633d9 atomic: favor compiler intrinsics for compare-and-swap over macOS APIs.
The OSAtomicCompareAndSwap* APIs are deprecated as of macOS 10.12.
2017-04-13 13:28:52 -04:00
Ryan C. Gordon
8c00de57f6 atomic: let Clang always use atomic_load_n if available.
(Apple's Clang reports itself as GCC 4.2.1 in preprocessor macros--the final
GNU C compiler Apple shipped--as of the macOS 10.12 SDK.)
2017-04-13 13:22:23 -04:00
Sam Lantinga
7891e72dca __atomic_load_n() appears to be available in GCC 5 but not GCC 4 2017-03-30 06:52:34 -07:00
Ryan C. Gordon
f2179944cc Patched to compile on some platforms. 2017-03-29 12:04:17 -04:00
James Legg
1dc9ae5c1e Use GCC's atomic loads in SDL_AtomicGet and SDL_AtomicGetPtr
This fixes errors reported by address sanitizer, and generates simpler
code on x86 architectures.
2017-03-29 15:48:22 +01:00
Sam Lantinga
06ccb71bcd Make sure the memory barrier functions are always available, and now they are implemented on Android __ARM_ARCH_5TE__ 2017-02-10 11:21:15 -08:00
Sam Lantinga
45b774e3f7 Updated copyright for 2017 2017-01-01 18:33:28 -08:00
Sam Lantinga
42065e785d Updated copyright to 2016 2016-01-02 10:10:34 -08:00
Philipp Wiesemann
0e45984fa0 Fixed crash if initialization of EGL failed but was tried again later.
The internal function SDL_EGL_LoadLibrary() did not delete and remove a mostly
uninitialized data structure if loading the library first failed. A later try to
use EGL then skipped initialization and assumed it was previously successful
because the data structure now already existed. This led to at least one crash
in the internal function SDL_EGL_ChooseConfig() because a NULL pointer was
dereferenced to make a call to eglBindAPI().
2015-06-21 17:33:46 +02:00