From 94924f012b8676da98e64306397770da73accf84 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Mon, 9 Nov 2020 10:11:55 -0800 Subject: [PATCH] Fix failing to set high priority for threads on Linux desktop. Debugging inside rtkit showed we were failing the RLIMIT_RTTIME check, now that we're asking for realtime and not just high-priority due to a change in SDL. Between that and the DBus code in SDL being wrong in previous changelist I'm not sure how this could have ever worked. --- src/core/linux/SDL_threadprio.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/core/linux/SDL_threadprio.c b/src/core/linux/SDL_threadprio.c index 937c376a3..275c15ca7 100644 --- a/src/core/linux/SDL_threadprio.c +++ b/src/core/linux/SDL_threadprio.c @@ -106,7 +106,8 @@ rtkit_initialize_thread() return SDL_FALSE; } - rlimit.rlim_cur = rlimit.rlim_max; + // Current rtkit allows a max of 200ms right now + rlimit.rlim_cur = rlimit.rlim_max = 100000; err = setrlimit(nLimit, &rlimit); if (err) {