SDL/src/thread
Sam Lantinga 07eae7d670 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
2020-11-11 08:47:18 -08:00
..
generic thread: Put all important SDL_CreateThread internal data into SDL_Thread. 2020-03-26 22:14:59 -04:00
os2 os2: a _lot_ of coding style cleanup, sot that they match the SDL style. 2020-10-15 21:37:30 +03:00
psp thread: Put all important SDL_CreateThread internal data into SDL_Thread. 2020-03-26 22:14:59 -04:00
pthread Fix process randomly getting killed when SDL_THREAD_PRIORITY_HIGH/TIME_CRITICAL is set 2020-11-11 08:47:18 -08:00
stdcpp Added SDL_log.h to SDL_internal.h so logging is available everywhere 2020-04-07 09:38:57 -07:00
windows thread: Put all important SDL_CreateThread internal data into SDL_Thread. 2020-03-26 22:14:59 -04:00
SDL_systhread.h thread: Put all important SDL_CreateThread internal data into SDL_Thread. 2020-03-26 22:14:59 -04:00
SDL_thread_c.h os2: integrate the port into main tree. 2020-10-14 23:01:06 +03:00
SDL_thread.c thread: Put all important SDL_CreateThread internal data into SDL_Thread. 2020-03-26 22:14:59 -04:00