SDL_HINT_THREAD_FORCE_REALTIME_TIME_CRITICAL(3)
π NAME
SDL_HINT_THREAD_FORCE_REALTIME_TIME_CRITICAL β bestie, this hint tells SDL whether SDL_THREAD_PRIORITY_TIME_CRITICAL should be treated as realtime. That's it, that's the whole job. π
β¨ SYNOPSIS β¨
#include <SDL3/SDL_hints.h>
#define SDL_HINT_THREAD_FORCE_REALTIME_TIME_CRITICAL "SDL_THREAD_FORCE_REALTIME_TIME_CRITICAL"
π§ DESCRIPTION π§
okay so, plot twist: on some platforms (looking at you, Linux π), a realtime priority thread can get hit with restrictions that your app has to handle itself, like, specially. This hint exists so SDL knows you, the app, are prepared to deal with said restrictions. It's giving "i got this, trust." π«Ά
On Linux, SDL will apply the following configuration to any thread that becomes realtime:
- The
SCHED_RESET_ON_FORKbit will be set on the scheduling policy, - An
RLIMIT_RTTIMEbudget will be configured to the rtkit specified limit. - Exceeding this limit will result in the kernel sending
SIGKILLto the app, refer to the man pages for more information.
not the kernel just ending your whole app with SIGKILL no cap π that's a whole assassination, fr fr. go read the man pages, bestie.
The variable can be set to the following values:
"0": default platform specific behaviour"1": ForceSDL_THREAD_PRIORITY_TIME_CRITICALto a realtime scheduling policy
This hint should be set before calling SDL_SetCurrentThreadPriority()
π AVAILABILITY π
This hint is available since SDL 3.2.0. β¨
mwah π that's the whole page, you ate it, periodt. this lil' legend came to you from the fine folks at Simple Directmedia Layer, shipping with SDL 3.4.18 β go forth and schedule responsibly, queen. ππ¦π
π¦ where this page comes from
- fedora 43: SDL3-devel 3.4.18-1.fc43 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 43: SDL3-devel 3.4.18-1.fc43 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 44: SDL3-devel 3.4.18-1.fc44 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 44: SDL3-devel 3.4.18-1.fc44 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms