Added SDL_LinuxSetThreadPriority() to directly set the priority of a Linux thread (tid)

This function tries using RealtimeKit connecting over DBUS as needed.
This commit is contained in:
Sam Lantinga committed 2018-04-23 19:18:52 -07:00
1 parent 816a6e68e5
commit 432312561f
4 files changed
+42 -18

No files matched your search

+12
View File
@@ -76,6 +76,18 @@ extern DECLSPEC SDL_bool SDLCALL SDL_DXGIGetOutputInfo( int displayIndex, int *a
#endif /* __WIN32__ */
/* Platform specific functions for Linux */
#ifdef __LINUX__
/**
\brief Sets the UNIX nice value for a thread, using setpriority() if possible, and RealtimeKit if available.
\return 0 on success, or -1 on error.
*/
extern DECLSPEC int SDLCALL SDL_LinuxSetThreadPriority(Sint64 threadID, int priority);
#endif /* __LINUX__ */
/* Platform specific functions for iOS */
#if defined(__IPHONEOS__) && __IPHONEOS__