chalonverse
3b191580c3
Windows GDK Support ( #5830 )
...
* Added GDK
* Simplfied checks in SDL_config_wingdk.h
* Added testgdk sample
* Added GDK readme
* Fixed error in merge of SDL_windows.h
* Additional GDK fixes
* OpenWatcom should not export _SDL_GDKGetTaskQueue
* Formatting fixes
* Moved initialization code into SDL_GDKRunApp
2022-06-27 10:19:39 -07:00
Francisco Javier Trujillo Mata
273d9e4640
Fix atomic support for PS2
2022-06-15 15:15:26 -07:00
Ozkan Sezer
67f12ede3b
move bug #5333 fix to headers
2022-02-08 21:32:50 +03:00
Ozkan Sezer
9b817248c5
SDL_spinlock.c: define HAVE_GCC_ATOMICS for windows/clang builds,
...
... if not already defined.
Fixes https://github.com/libsdl-org/SDL/issues/5333
diff --git a/src/atomic/SDL_spinlock.c b/src/atomic/SDL_spinlock.c
index bdd347e..4f10741 100644
--- a/src/atomic/SDL_spinlock.c
+++ b/src/atomic/SDL_spinlock.c
@@ -28,6 +28,12 @@
#include "SDL_mutex.h"
#include "SDL_timer.h"
+#if defined(__WIN32__) && defined(__clang__)
+# ifndef HAVE_GCC_ATOMICS
+# define HAVE_GCC_ATOMICS 1
+# endif
+#endif
+
#if !defined(HAVE_GCC_ATOMICS) && defined(__SOLARIS__)
#include <atomic.h>
#endif
2022-02-08 18:50:02 +03:00
Sam Lantinga
120c76c84b
Updated copyright for 2022
2022-01-03 09:40:21 -08:00
Ozkan Sezer
53aa8eec5f
minor cleanup for watcom _inline keyword.
2021-11-25 17:00:24 +03:00
Ryan C. Gordon
f4eb7f329e
spinlock: Favor gcc-style atomics over MSVC interfaces.
...
This resolves a problem when using Clang on Windows.
Fixes #4346 .
2021-07-27 13:45:33 -04:00
Cameron Gutman
014f507c40
Use specific acquire and release variants of InterlockedExchange on ARM
...
_InterlockedExchange_rel() is required for correctness on ARM because
the _ReadWriteBarrier() macro is only a compiler memory barrier, not a
hardware memory barrier. Due to ARM's relaxed memory model, this means
the '*lock = 0' write may be observed before the operations inside the
lock, causing possible corruption of data protected by the lock.
_InterlockedExchange_acq() is more efficient on ARM because it avoids an
expensive full memory barrier that _InterlockedExchange() does.
2021-01-03 12:13:40 -06:00
Cameron Gutman
59594a7891
Implement PAUSE_INSTRUCTION() for Windows ARM platforms
2021-01-02 13:43:04 -06:00
Sam Lantinga
9130f7c377
Updated copyright for 2021
2021-01-02 10:25:38 -08:00
Sam Lantinga
d25eff6505
Fixed bug 5429 - spinlock implements PAUSE_INSTRUCTION for PPC platforms
...
David Carlier
This form of 'or' provides a hint that performance
will probably be improved if shared resources dedicated
to the executing processor are released for use by other
processors
2021-01-02 10:06:22 -08:00
Sam Lantinga
6bd4c717a1
Fixed bug 5402 - ARM support little update proposal
...
David Carlier
No fix but mostly an update for ARM architecture.
2020-12-17 21:41:23 -08:00
Cameron Cawley
8f1a916ac5
Add basic support for compiling on RISC OS
2020-02-13 20:50:47 +00:00
Sam Lantinga
a8780c6a28
Updated copyright date for 2020
2020-01-16 20:49:25 -08:00
Cameron Cawley
85aabec27e
atomic: Support compiling on ARMv3
2019-10-11 22:08:53 +01:00
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
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