mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-27 21:48:29 +00:00
Rename SDL_SetThreadPriority() to SDL_SetCurrentThreadPriority()
Fixes https://github.com/libsdl-org/SDL/issues/11055
This commit is contained in:
@@ -3002,7 +3002,7 @@ extern "C" {
|
||||
* - "1": Force SDL_THREAD_PRIORITY_TIME_CRITICAL to a realtime scheduling
|
||||
* policy
|
||||
*
|
||||
* This hint should be set before calling SDL_SetThreadPriority()
|
||||
* This hint should be set before calling SDL_SetCurrentThreadPriority()
|
||||
*
|
||||
* \since This hint is available since SDL 3.0.0.
|
||||
*/
|
||||
@@ -3010,9 +3010,9 @@ extern "C" {
|
||||
|
||||
/**
|
||||
* A string specifying additional information to use with
|
||||
* SDL_SetThreadPriority.
|
||||
* SDL_SetCurrentThreadPriority.
|
||||
*
|
||||
* By default SDL_SetThreadPriority will make appropriate system changes in
|
||||
* By default SDL_SetCurrentThreadPriority will make appropriate system changes in
|
||||
* order to apply a thread priority. For example on systems using pthreads the
|
||||
* scheduler policy is changed automatically to a policy that works well with
|
||||
* a given priority. Code which has specific requirements can override SDL's
|
||||
@@ -3023,9 +3023,9 @@ extern "C" {
|
||||
*
|
||||
* On Linux, the kernel may send SIGKILL to realtime tasks which exceed the
|
||||
* distro configured execution budget for rtkit. This budget can be queried
|
||||
* through RLIMIT_RTTIME after calling SDL_SetThreadPriority().
|
||||
* through RLIMIT_RTTIME after calling SDL_SetCurrentThreadPriority().
|
||||
*
|
||||
* This hint should be set before calling SDL_SetThreadPriority()
|
||||
* This hint should be set before calling SDL_SetCurrentThreadPriority()
|
||||
*
|
||||
* \since This hint is available since SDL 3.0.0.
|
||||
*/
|
||||
|
@@ -644,6 +644,7 @@
|
||||
#define SDL_iPhoneSetEventPump SDL_SetiOSEventPump
|
||||
|
||||
/* ##SDL_thread.h */
|
||||
#define SDL_SetThreadPriority SDL_SetCurrentThreadPriority
|
||||
#define SDL_TLSCleanup SDL_CleanupTLS
|
||||
#define SDL_TLSGet SDL_GetTLS
|
||||
#define SDL_TLSSet SDL_SetTLS
|
||||
@@ -1281,6 +1282,7 @@
|
||||
#define SDL_iPhoneSetEventPump SDL_iPhoneSetEventPump_renamed_SDL_iOSSetEventPump
|
||||
|
||||
/* ##SDL_thread.h */
|
||||
#define SDL_SetThreadPriority SDL_SetThreadPriority_renamed_SDL_SetCurrentThreadPriority
|
||||
#define SDL_TLSCleanup SDL_TLSCleanup_renamed_SDL_CleanupTLS
|
||||
#define SDL_TLSGet SDL_TLSGet_renamed_SDL_GetTLS
|
||||
#define SDL_TLSSet SDL_TLSSet_renamed_SDL_SetTLS
|
||||
|
@@ -89,7 +89,7 @@ typedef SDL_AtomicInt SDL_TLSID;
|
||||
*
|
||||
* SDL will make system changes as necessary in order to apply the thread
|
||||
* priority. Code which attempts to control thread state related to priority
|
||||
* should be aware that calling SDL_SetThreadPriority may alter such state.
|
||||
* should be aware that calling SDL_SetCurrentThreadPriority may alter such state.
|
||||
* SDL_HINT_THREAD_PRIORITY_POLICY can be used to control aspects of this
|
||||
* behavior.
|
||||
*
|
||||
@@ -385,7 +385,7 @@ extern SDL_DECLSPEC SDL_ThreadID SDLCALL SDL_GetThreadID(SDL_Thread *thread);
|
||||
*
|
||||
* \since This function is available since SDL 3.0.0.
|
||||
*/
|
||||
extern SDL_DECLSPEC bool SDLCALL SDL_SetThreadPriority(SDL_ThreadPriority priority);
|
||||
extern SDL_DECLSPEC bool SDLCALL SDL_SetCurrentThreadPriority(SDL_ThreadPriority priority);
|
||||
|
||||
/**
|
||||
* Wait for a thread to finish.
|
||||
|
Reference in New Issue
Block a user