|
7d02248c
|
2021-04-02T14:36:53
|
|
tls: wrap reference to a mutex into an #if !SDL_THREADS_DISABLED test.
|
|
fb283a73
|
2021-03-24T22:42:47
|
|
Squashed commit of the following:
commit 6b8f933589aa3925978a23e77a305a7e89c6ae4a
Author: Xing Ji <jixingcn@gmail.com>
Date: Wed Mar 24 22:31:29 2021 +0800
update the dynapi by `gendynapi.pl`
commit ebd1790c19983b652713f40ab1e139e485e1a2b7
Author: Xing Ji <jixingcn@gmail.com>
Date: Wed Mar 24 22:17:48 2021 +0800
revert the change in src/dynapi
commit 734b5f85c1613070081e39238e84198128971b53
Merge: 5a56e5a8 5ac6bd54
Author: Xing Ji <jixingcn@gmail.com>
Date: Wed Mar 24 22:14:40 2021 +0800
Merge remote-tracking branch 'libsdl/main' into jixingcn
commit 5a56e5a8227d9cff6b497b681c618a76bec1cae1
Author: Xing Ji <jixingcn@gmail.com>
Date: Mon Mar 22 23:55:10 2021 +0800
Fix #3596, can call the `SDL_TLSCleanup` to cleanup the TLS data when closing the application
|
|
b55b11af
|
2021-03-23T08:07:56
|
|
src/thread/pthread/SDL_systhread.c: drop include of SDL_platform.h
Drop include of SDL_platform.h as SDL_plaform.h is already included by
SDL_internal.h -> SDL_config.h -> SDL_platform.h
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
|
a4ddb175
|
2021-03-08T19:28:58
|
|
Formatting
|
|
189d3c16
|
2021-01-20T23:41:35
|
|
FIFO is default (and not defined in vitasdk, ugh)
|
|
87a118b6
|
2021-01-20T23:33:28
|
|
Use native mutexes
|
|
7423ae1a
|
2021-01-20T23:33:16
|
|
Formatting
|
|
7b0b1a12
|
2020-12-23T17:26:52
|
|
Update thread api to 2.0.14
|
|
2d64e37e
|
2020-11-02T18:09:43
|
|
Initial rebase of xerpi's port
|
|
f70e1973
|
2021-02-08T18:31:08
|
|
Fix waiting on condition variables with the SRW lock implmentation
When SleepConditionVariableSRW() releases the SRW lock internally, it causes
our SDL_mutex_srw state to become inconsistent. The lock is unowned yet inside,
the owner is still the sleeping thread and more importantly the owner count is
still 1.
The next time someone acquires the lock, they will bump the owner count from 1
to 2. At that point, the lock is hosed. From the internal lock state, it looks
to us like that owner has acquired the lock recursively, even though they have
not. When they call SDL_UnlockMutex(), it will see the owner count > 0 and not
call ReleaseSRWLockExclusive().
Now when someone calls SDL_CondSignal(), SleepConditionVariableSRW() will start
the wakeup process by attempting to re-acquire the SRW lock. This will deadlock
because the lock was never released after the other thread had used it. The
thread waiting on the condition variable will never be able to wake up, even if
the SDL_CondWaitTimeout() function is used and the timeout expires.
|
|
265a1cc9
|
2021-01-05T15:50:02
|
|
use WIN_StringToUTF8W instead of WIN_StringToUTF8 where needed (#2)
cf. bug #5435.
- SDL_wasapi_win32.c (GetWasapiDeviceName): pwszVal is WCHAR*
- windows/SDL_sysfilesystem.c (SDL_GetBasePath, SDL_GetPrefPath)
- windows/SDL_sysurl.c (SDL_SYS_OpenURL): wurl is WCHAR*
- SDL_windowssensor.c (ConnectSensor): bstr_name is WCHAR*
- windows/SDL_systhread.c (SDL_SYS_SetupThread): strw is WCHAR*
|
|
01a2f276
|
2021-01-04T01:23:50
|
|
consistently use TEXT() macro with LoadLibrary() and GetModuleHandle()
cf. bug #5435.
|
|
9130f7c3
|
2021-01-02T10:25:38
|
|
Updated copyright for 2021
|
|
8fc0baad
|
2020-12-28T11:43:11
|
|
Add SDL_cond implementation using Windows Condition Variables
Is automatically used when the SRW SDL_mutex implementation is active.
Otherwise falls back to the generic implementation.
v2: - Rebase onto master fa3ea1051a4b
|
|
2443e51e
|
2020-12-28T11:42:49
|
|
Add optional suffix `_generic` to generic SDL_cond impl
Allows for runtime selectable implementation
|
|
e7c47941
|
2020-12-25T17:10:02
|
|
Disable WaitOnAddress SDL_sem implementation on Windows Phone
Apps that use the required APIs do not pass certification.
|
|
d6afc1c6
|
2020-12-25T04:00:20
|
|
thread/windows: Statically link synchronization APIs on WINRT
GetModuleHandleW is not available on those platforms
---
.../WinPhone81_VS2013/SDL-WinPhone81.vcxproj | 8 ++++----
VisualC-WinRT/WinRT81_VS2013/SDL-WinRT81.vcxproj | 12 ++++++------
src/thread/windows/SDL_sysmutex.c | 12 ++++++++++++
src/thread/windows/SDL_syssem.c | 11 +++++++++++
4 files changed, 33 insertions(+), 10 deletions(-)
|
|
d0b8295c
|
2020-12-23T13:36:46
|
|
Add SDL_sem implementation using Atomics and WaitOnAddress API.
Keep Semaphore Kernel Object impl for Windows 7 and older - choose at runtime
v2: - Fix mixed int/LONG types
- Reorder definitions
- Add missing include
v3: - Use `GetModuleHandle()` to load the API Set
|
|
548cb908
|
2020-12-23T13:33:36
|
|
Add SDL_mutex implementation using Windows Slim Reader/Writer Locks Keep Critical Section impl for Windows XP/Vista - choose at runtime
v2: - Add SRW definitions as suggested by Ozkan Sezer
Allows building against older platform headers.
- Rename "hidden" function parameter `mutex_` to `_mutex`
v3: - Use GetModuleHandle instead of LoadLibrary
- Fix typo in comment
|
|
a19c008a
|
2020-12-22T17:10:02
|
|
use GetModuleHandleW() to retrieve kernel32.dll handle (bug #5390.)
SDL_systhread.c and SDL_syslocale.c used to call LoadLibrary() without
calling FreeLibrary() later. GetModuleHandleW() should always succeed
because GetModuleHandleW() itself is imported from kernel32.dll and we
don't need to bother releasing it.
|
|
cb361896
|
2020-12-09T07:16:22
|
|
Fixed bug 5235 - All internal sources should include SDL_assert.h
Ryan C. Gordon
We should really stick this in SDL_internal.h or something so it's always available.
|
|
0500c044
|
2020-11-12T07:53:05
|
|
Fix SDL_HINT_THREAD_FORCE_REALTIME_TIME_CRITICAL also applying to HIGH priorities
As the name suggests, the hint should only apply to SDL_THREAD_PRIORITY_TIME_CRITICAL
The resulting priorities for my current distro result in these values:
| High | Time Critical
Hint |--------------|-----------------
0 | P=10 N=-10 | P=5 N=-15
1 | P=10 N=-10 | P=-21 N=0
|
|
07eae7d6
|
2020-11-11T08:47:18
|
|
Fix process randomly getting killed when SDL_THREAD_PRIORITY_HIGH/TIME_CRITICAL is set
When we request realtime priority from rtkit, we have a rttime limit. If we exceed
that limit, the kernel will send SIGKILL to the process to terminate it.
This isn't something that most high priority processes will want, only processes
that selectively opt into SCHED_RR/FIFO through SDL_HINT_THREAD_PRIORITY_POLICY
should be subject to this level of scrutiny.
This change:
* Switches non-apple posix OSs to use SCHED_OTHER instead of SCHED_RR
for SDL_THREAD_PRIORITY_HIGH/SDL_THREAD_PRIORITY_TIME_CRITICAL.
* Fixes using a hardcoded RLIMIT_RTTIME, instead queries it from rtkit
* Only sets RLIMIT_RTTIME for MakeRealtime rtkit requests
* Adds a note regarding the possible SIGKILL with SDL_HINT_THREAD_PRIORITY_POLICY
* Introduces SDL_HINT_THREAD_FORCE_REALTIME_TIME_CRITICAL to allow apps to acquire realtime scheduling policies on Linux
|
|
a90f0400
|
2020-10-15T21:37:30
|
|
os2: a _lot_ of coding style cleanup, sot that they match the SDL style.
also renamed the 'debug' macro to debug_os2: the former was dangerously
a common name.
the binary (dll) output is precisely the same as before.
|
|
d2723875
|
2020-10-14T23:01:06
|
|
os2: integrate the port into main tree.
|
|
1d9cf23e
|
2020-10-14T23:01:05
|
|
os2: updated copyright dates for 2020. header guard fixes.
|
|
54ced668
|
2020-10-14T23:01:04
|
|
port from 2.0.12 to 2.0.13 / current SDL-hg repository.
- video: VideoBootStrap->available() is gone.
- thread: all important SDL_CreateThread internal data now put into
struct SDL_Thread: changes to SDL_SYS_CreateThread().
|
|
222f0268
|
2020-10-14T23:01:03
|
|
os/2: port from SDL2-2.0.4 to SDL2-2.0.5:
changes to SDL_os2audio.c, SDL_os2video.c, os2/SDL_systhread.c in order
to accomodate SDL2-2.0.5 changes.
- audio: WaitDone() is gone, CloseDevice() interface changes.
- events / video: DropFile() changes:
SDL_DROPBEGIN and SDL_DROPCOMPLETE events, window IDs for drops.
- thread: struct SDL_Thread->stacksize
|
|
f9af19f5
|
2020-10-14T23:01:02
|
|
os2: updates to SDL_systhread.c:
removed lots of garbage. added SDL_PASSED_BEGINTHREAD_ENDTHREAD guard,
because the code requires it.
|
|
74cfb81d
|
2020-10-14T23:01:00
|
|
os2: add port files for SDL2-2.0.4 from Andrey Vasilkin
only geniconv/iconv.h (was from LGPL libiconv) is replaced with a generic
minimal iconv.h based on public knowledge.
|
|
0713c579
|
2020-05-26T13:19:44
|
|
More Linux fixes.
|
|
c7d1dab1
|
2020-05-26T13:19:41
|
|
Rename Linux-only variable.
|
|
b820a81f
|
2020-05-26T13:19:35
|
|
Include SDL_hints.h.
|
|
de866e66
|
2020-05-26T13:19:29
|
|
Include SDL_hint.h.
|
|
abd58418
|
2020-05-26T13:19:19
|
|
Make some changes to SDL_SetThreadPriority to try and have SDL transparently handle more of the work.
1. Comment that SDL_SetThreadPriority will make any necessary system changes when applying priority.
2. Add a hint to override SDL's default behavior for scheduler policy.
3. Modify the pthreads SDL_SetThreadPriority so that instead of just using the current thread scheduler policy it will change it to a policy that should work best for the requested priority.
4. Add hint checks in SDL_SetThreadPriority so that #3 can be overridden if desired.
5. Modify the Linux SDL_SetThreadPriority so that in the case that policy, either by SDL defaults or from the hint, is a realtime policy it uses the realtime rtkit API.
6. Prior to calling rtkit on Linux make the necessary thread state changes that rtkit requires. Currently this is done every time as it isn't expected that SDL_SetThreadPriority will be called repeatedly for a thread.
|
|
b6afbe63
|
2020-04-07T09:38:57
|
|
Added SDL_log.h to SDL_internal.h so logging is available everywhere
|
|
378a5cfb
|
2020-04-01T16:39:05
|
|
Updated thread priorities for Apple operating systems
|
|
46bb47cf
|
2020-03-26T22:14:59
|
|
thread: Put all important SDL_CreateThread internal data into SDL_Thread.
This avoids the need to malloc something extra, use a semaphore, etc, and
fixes Emscripten with pthreads support, which might not spin up a web worker
until after SDL_CreateThread returns and thus can't wait on a semaphore at
this point in any case.
Fixes Bugzilla #5064.
|
|
bd5da73a
|
2020-03-01T12:50:42
|
|
Fixed bug 4992 - UWP/WinRT does not set thread priority when using SDL_SetThreadPriority
Ethan Lee
Attached is a diff that I used to get SetThreadPriority working locally. I still have no idea what the minimum SDK version is since Microsoft never documented it, but it's worth pointing out that they're much more aggressive about using the latest VS and UWP SDK anyway (for example, an updated Xbox is no longer compatible with VS2017, and updates are required to have a network connection of any kind).
|
|
8f1a916a
|
2020-02-13T20:50:47
|
|
Add basic support for compiling on RISC OS
|
|
a8780c6a
|
2020-01-16T20:49:25
|
|
Updated copyright date for 2020
|
|
81cdd500
|
2019-10-30T17:35:40
|
|
Remove redundant 'SDL_GetErrBuf' declaration
|
|
b458d7a2
|
2019-10-30T15:13:55
|
|
Readability: remove redundant cast to the same type
|
|
01c924fa
|
2019-03-19T17:20:54
|
|
Hopefully fixed the mingw32 build
|
|
deb7d08c
|
2019-03-19T17:05:22
|
|
Fixed Visual Studio build
|
|
ac23d78f
|
2019-03-19T16:53:55
|
|
Didn't need to add SDL_windows.h include, that was already included
|
|
b2e76d86
|
2019-03-19T16:52:09
|
|
Fixed Windows RT build
|
|
5e13087b
|
2019-01-04T22:01:14
|
|
Updated copyright for 2019
|
|
252dc85e
|
2018-12-06T09:22:00
|
|
Fix warnings detected on Android build
|
|
1689e9f9
|
2018-12-05T16:51:22
|
|
linux: Move SDL_LinuxSetThreadPriority() elsewhere to fix build.
Fixes Bugzilla #4393.
|
|
6259a726
|
2018-12-05T16:13:12
|
|
Warnings: fix a documentation warning and missing prototypes
|
|
c4bc59a5
|
2018-12-01T10:36:26
|
|
Patched to compile on Linux with --disable-threads.
Fixes Bugzilla #4393.
|
|
acb05f50
|
2018-10-11T16:40:01
|
|
thread: make SDL_CreateThreadWithStackSize() a public API.
|
|
0ad4b0b6
|
2018-05-21T12:00:21
|
|
thread: fixed compiler warnings on non-Linux systems that use pthread.
(static function rtkit_setpriority was unused, moved it in with rest of
__LINUX__ section.)
|
|
8f780e76
|
2018-04-23T22:17:56
|
|
Fixed build
|
|
f521b22e
|
2018-04-23T22:07:56
|
|
Added SDL_THREAD_PRIORITY_TIME_CRITICAL
|
|
a1b8fa60
|
2018-04-23T21:50:03
|
|
TryLockMutex: Fix error handling for TryLockMutex
Christian Herzig
pthread_mutex_trylock() and by the way, pthread_mutex_lock() do not set errno.
Pthread-methods directly return error code as int. See related man-pages for
details.
|
|
b5d231ee
|
2018-04-23T19:20:12
|
|
Handle NULL return from SDL_DBus_GetContext()
|
|
43231256
|
2018-04-23T19:18:52
|
|
Added SDL_LinuxSetThreadPriority() to directly set the priority of a Linux thread (tid)
This function tries using RealtimeKit connecting over DBUS as needed.
|
|
816a6e68
|
2018-04-23T17:10:36
|
|
Added support for adjusting thread priorities using Linux RealtimeKit
Michael Sartain
This is a quick pass at adding Linux RealtimeKit thread priority support to SDL.
It allows me to bump the thread priority to high without root privileges or setting any caps, etc.
rtkit readme here:
http://git.0pointer.net/rtkit.git/tree/README
|
|
f9f45d0b
|
2018-02-25T19:51:34
|
|
Fixed bug 4097 - Segmentation fault by SDL_CreateThreadWithStackSize
Dongsun Kim
Normal case
1. [thread 1] SDL_CreateThreadWithStackSize calls SDL_SYS_CreateThread.
2. [thread 1] If successful, it calls SDL_SemWait.
3. [thread 2] SDL_RunThread calls SDL_SYS_SetupThread, SDL_ThreadID, SDL_SemPost.
4. [thread 1] SDL_CreateThreadWithStackSize calls SDL_DestroySemaphore, SDL_free.
Crash case (Segmentation fault)
1. [thread 1] SDL_CreateThreadWithStackSize calls SDL_SYS_CreateThread.
2. [thread 1] If successful, it calls SDL_SemWait.
--> Error return due to SIGNAL(SYSTEM or Real Time) at sem_wait(pthread).
3. [thread 1] SDL_CreateThreadWithStackSize calls SDL_DestroySemaphore, SDL_free.
4. [thread 2] SDL_RunThread calls SDL_SYS_SetupThread, SDL_ThreadID, SDL_SemPost.
--> Segmentation fault at strlen or sem_post.
|
|
75a58303
|
2018-02-17T23:57:57
|
|
pthread: fix error code checks (thanks, Andreas!).
Most pthread functions return 0 on success and non-zero on error, but those
errors might be positive or negative, so checking for return values in the
Unix style, where errors are less than zero, is a bug.
Fixes Bugzilla #4039.
|
|
40b27fd5
|
2018-02-12T17:00:00
|
|
revert the recent typecast assignment changes (see bug #4079)
also change the void* typedefs for the two vulkan function
pointers added in vulkan_internal.h into generic function
pointer typedefs.
|
|
90e72bf4
|
2018-01-30T18:08:34
|
|
Fixed ISO C99 compatibility
SDL now builds with gcc 7.2 with the following command line options:
-Wall -pedantic-errors -Wno-deprecated-declarations -Wno-overlength-strings --std=c99
|
|
e3cc5b2c
|
2018-01-03T10:03:25
|
|
Updated copyright for 2018
|
|
140cc460
|
2017-12-31T03:35:41
|
|
windows: Use WaitForSingleObjectEx() always
This is available since Windows XP, so it's safe to use always, not just in
a WinRT ifdef.
|
|
0d011ec6
|
2017-08-28T00:22:23
|
|
Renaming of guard header names to quiet -Wreserved-id-macro
|
|
de91b124
|
2017-08-14T06:28:21
|
|
Fixed bug 3745 - specify SDLCALL as the calling convention for API callbacks
Patches contributed by Ozkan Sezer
|
|
7229397c
|
2017-08-11T21:47:31
|
|
Fixed bug 3258 - SDL_TryLockMutex blocks for pthreads with FAKE_RECURSIVE_MUTEX
Ian Abbott
I just spotted what I think is a bug in "src/thread/pthread/SDL_sysmutex.c" in the SDL_TryLockMutex function when FAKE_RECURSIVE_MUTEX is defined (for an implementation of Pthreads with no recursive mutex support). It calls pthread_mutex_lock instead of pthread_mutex_trylock, so it will block until the mutex is available instead of returning SDL_MUTEX_TIMEDOUT if it cannot lock the mutex immediately.
|
|
6d661cab
|
2017-06-06T13:12:43
|
|
windows: Change the default on SDL_HINT_WINDOWS_DISABLE_THREAD_NAMING.
It's easier for Visual Studio users that want this information to turn it on
or live without it, than it is to explain why every debugger that isn't Visual
Studio crashes out here. Eventually SetThreadDescription() will be the thing
everyone uses anyhow.
Fixes Bugzilla #3645.
(and several others).
|
|
619ab7a2
|
2017-05-01T18:39:05
|
|
haiku: Various fixes from haikuports.
Based on patch here:
https://github.com/haikuports/haikuports/blob/master/media-libs/libsdl2/patches/libsdl2-2.0.5.patchset
|
|
1517ba72
|
2017-04-02T21:33:54
|
|
PSP: Fixed error messages.
|
|
d1eb2d19
|
2017-02-13T17:05:14
|
|
thread: Don't use SetThreadDescription on WinRT right now.
Can't LoadLibrary for it, but not sure if it's actually available there yet.
|
|
8fa9b57f
|
2017-01-27T20:50:30
|
|
windows: first shot at naming threads with SetThreadDescription().
This is a bleeding edge API, added to Windows 10 Anniversary Edition (build
1607, specifically).
https://msdn.microsoft.com/en-us/library/windows/desktop/mt774976(v=vs.85).aspx
Nothing supports this yet, including WinDbg, Visual Studio, minidumps, etc,
so we still need to also use the RaiseException hack. But presumably tools
will use this API as a more robust and universal way to get thread names
sooner or later, so we'll start broadcasting to it now.
|
|
45b774e3
|
2017-01-01T18:33:28
|
|
Updated copyright for 2017
|
|
36156335
|
2016-11-20T21:34:54
|
|
Renaming of guard header names to quiet -Wreserved-id-macro
Patch contributed by Sylvain
|
|
97aa5775
|
2016-11-16T22:08:51
|
|
Fixed empty parameter list in signatures of internal functions.
|
|
57d01d7d
|
2016-11-13T22:57:41
|
|
Patch from Sylvain to fix clang warnings
|
|
74e1dd4c
|
2016-11-11T13:14:00
|
|
Define _GNU_SOURCE when building SDL
|
|
83cb2b63
|
2016-10-14T06:57:55
|
|
Fixed bug 2758 - Android issues with NDK r10c and API-21
Sylvain
After a long time, I found out more clearly what was going wrong.
The native libraries should be built with a "APP_PLATFORM" as low as possible.
Ideally, APP_PLATFORM should be equals to the minSdkVersion of the AndroidManifest.xml
So that the application never runs on a lower APP_PLATFORM than it has been built for.
An additional good patch would be to write explicitly in "jni/Application.mk": APP_PLATFORM=android-10
(If no APP_PLATFORM is set, the "targetSdkVersion" of the AndroidManifest.xml is applied as an APP_PLATFORM to the native libraries. And currently, this is bad, because targetSdkVersion is 12, whereas minSdkLevel is 10.
And in fact, there is a warning from ndk: "Android NDK: WARNING: APP_PLATFORM android-12 is larger than android:minSdkVersion 10 in ./AndroidManifest.xml".)
to precise what happened in the initial reported test-case:
Let say the "c" code contains a call to "srand()".
with APP_PLATFORM=android-21, libSDL2.so contains a undef reference to "srand()".
with APP_PLATFORM=android-10, libSDL2.so contains a undef reference to "srand48()".
but srand() is missing on devices with APP_PLATFORM=android-10 (it was in fact replaced by srand48()).
So, if you build for android-21 (where srand() is available), you will really have a call to "srand()" and it will fail on android-10.
That was the issue. The path tried to fix this by in fact always calling srand48().
SDL patches that were applied are beneficial anyway, there are implicitly allowing they backward compatibility of using android-21 on a android-10 platform.
It can be helpful in case you want to target a higher APP_PLATFORM than minSdkVersion to have potentially access to more functions.
Eg you want to have access to GLES3 functions (or other) of "android-21". But, if dlopen() fails (on android-10), you do a fall-back to GLES2.
|
|
741aaf4c
|
2016-10-12T22:34:54
|
|
Added a note on how to allow non-root applications to increase their thread priority on Linux
|
|
27d4f099
|
2016-10-07T23:40:44
|
|
Implemented SDL_GetHintBoolean() to make it easier to check boolean hints
|
|
9f854cdb
|
2016-10-01T10:08:34
|
|
Fixed bug 3388 - Fail to build src/thread/windows/SDL_systhread.c on MinGW 4.9.3
Vitaly Novichkov
Line 124
====================================================================
const DWORD flags = thread->stacksize ? STACK_SIZE_PARAM_IS_A_RESERVATION : 0;
====================================================================
Error of compiler:
====================================================================
CC build/SDL_systhread.lo
src/thread/windows/SDL_systhread.c: In function 'SDL_SYS_CreateThread':
src/thread/windows/SDL_systhread.c:124:45: error: 'STACK_SIZE_PARAM_IS_A_RESERVA
TION' undeclared (first use in this function)
const DWORD flags = thread->stacksize ? STACK_SIZE_PARAM_IS_A_RESERVATION :
0;
^
src/thread/windows/SDL_systhread.c:124:45: note: each undeclared identifier is r
eported only once for each function it appears in
make: *** [build/SDL_systhread.lo] Error 1
====================================================================
Fixing when I adding into begin of the file:
====================================================================
#ifndef STACK_SIZE_PARAM_IS_A_RESERVATION
#define STACK_SIZE_PARAM_IS_A_RESERVATION 0x00010000
#endif
====================================================================
|
|
92d700f1
|
2016-09-30T09:26:57
|
|
SDL_HINT_WINDOWS_DISABLE_THREAD_NAMING
|
|
72dc8784
|
2016-04-14T21:09:45
|
|
PSP: Fixed compile error.
|
|
9b9ca093
|
2016-04-12T18:12:04
|
|
windows: created threads' stack sizes should be reserved, not committed.
|
|
c61675dc
|
2016-04-12T16:45:10
|
|
threads: Move SDL's own thread creation to a new internal API.
This allows us to set an explicit stack size (overriding the system default
and the global hint an app might have set), and remove all the macro salsa
for dealing with _beginthreadex and such, as internal threads always set those
to NULL anyhow.
I've taken some guesses on reasonable (and tiny!) stack sizes for our
internal threads, but some of these might turn out to be too small in
practice and need an increase. Most of them are simple functions, though.
|
|
7ae2951f
|
2016-04-12T14:38:50
|
|
threads: Handle SDL_HINT_THREAD_STACK_SIZE at top level, implement elsewhere.
|
|
481a21b0
|
2016-02-21T17:21:29
|
|
Windows: Just use WaitForSingleObjectEx() everywhere.
(It's supported on WinXP, no reason to have an #ifdef here...I think.)
|
|
9fd4d4dd
|
2016-02-21T17:05:25
|
|
Windows: let threads be named in the debugger.
We now only raise the magic exception that names the thread when
IsDebuggerPresent() returns true. In such a case, Visual Studio will
catch the exception, set the thread name, and let the debugged process
continue normally. If the debugger isn't running, we don't raise an exception
at all.
Setting the name is a debugger trick; if the debugger isn't running, the name
won't be set if attached later in any case, so this doesn't lose functionality.
This lets this code work without assembly code, on win32 and win64, and
across various compilers.
The only "gotcha" is that if you have something attached that looks like a
debugger but doesn't respect this magic exception trick, the process will
likely crash, but that's probably a deficiency of the attached program.
Fixes Bugzilla #2089.
|
|
42065e78
|
2016-01-02T10:10:34
|
|
Updated copyright to 2016
|
|
696cd797
|
2015-12-29T02:32:47
|
|
NetBSD: fixed issues with cpuinfo and pthread_setname_np (thanks, Thomas!).
Fixes Bugzilla #3176.
|
|
fa2d5ab4
|
2015-11-26T13:51:03
|
|
WinRT: bug-fix - SDL_SetThreadPriority() didn't work on WinRT 8.x platforms
WinRT 8.0 (Phone and non-Phone) didn't offer an API to set an already-created
thread's priority. WinRT 8.1 offered this API, along with several other
Win32 thread functions that were previously unavailable (in WinRT).
This change makes WinRT 8.1+ platforms use SDL's Win32 backend.
|
|
a5a80cd0
|
2015-11-15T13:04:42
|
|
WinRT: fixed crash in SDL_CondWaitTimeout, when using Win10's MSVC runtime
|
|
98986f39
|
2015-08-15T21:21:29
|
|
Removed not needed call to pthread_attr_getstacksize() for SDL_CreateThread().
|
|
29199056
|
2015-07-15T21:11:24
|
|
PSP: Fixed error handling in SDL_SemWaitTimeout().
Signed integers were converted to unsigned before being checked if smaller 0.
Found by Cppcheck.
|
|
0e45984f
|
2015-06-21T17:33:46
|
|
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().
|
|
1a348aac
|
2015-06-17T21:05:25
|
|
Android: Fixed two warnings.
|
|
45989035
|
2015-06-17T00:07:45
|
|
Partial fix for bug 2758 - Android issues with NDK r10c and API-21
Sylvain
When using API 21 and running on an old device (android < 5.0 ?) some function are missing.
functions are (at least) : signal, sigemptyset, atof, stpcpy (strcat and strcpy), srand, rand.
Very few modifications on SDL to get this working :
on SDL
======
Undefine android configuration :
HAVE_SIGNAL
HAVE_SIGACTION
HAVE_ATOF
In "SDL_systrhead.c", comment out the few block of lines with "sigemptyset".
Android.mk:
remove the compilation of "test" directory because it contains a few rand/srand calls
Also, there are more discussions about this in internet :
https://groups.google.com/forum/#!topic/android-ndk/RjO9WmG9pfE
http://stackoverflow.com/questions/25475055/android-ndk-load-library-cannot-locate-srand
|
|
98f9b88c
|
2015-06-13T13:36:47
|
|
Fixed bug 3011 - pthread/SDL_syssem.c requires _GNU_SOURCE
Ozkan Sezer
pthread/SDL_syssem.c requires _GNU_SOURCE predefined (like SDL_sysmutex.c),
otherwise sem_timedwait() prototype might not be available to it. Problem
seen with glibc-2.3.4.
|