mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-05-21 20:28:28 +00:00
Export SDL_LinuxSetThreadPriorityAndPolicy() function (#4877)
It's marked as being a public symbol internally, however, it was missing from the header files and not visible in the shared library. This adds it to the necessary headers and to the DynAPI list to expose it for use by applications. Co-authored-by: Frank Praznik <frank.praznik@oh.rr.com>
This commit is contained in:
parent
848d7b1254
commit
43ddc59fa8
4 changed files with 16 additions and 11 deletions
|
@ -140,6 +140,18 @@ extern DECLSPEC SDL_bool SDLCALL SDL_DXGIGetOutputInfo( int displayIndex, int *a
|
|||
* \since This function is available since SDL 2.0.9.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_LinuxSetThreadPriority(Sint64 threadID, int priority);
|
||||
|
||||
/**
|
||||
* Sets the priority (not nice level) and scheduling policy for a thread.
|
||||
*
|
||||
* This uses setpriority() if possible, and RealtimeKit if available.
|
||||
*
|
||||
* \param threadID The Unix thread ID to change priority of.
|
||||
* \param sdlPriority The new SDL_ThreadPriority value.
|
||||
* \param schedPolicy The new scheduling policy (SCHED_FIFO, SCHED_RR, SCHED_OTHER, etc...)
|
||||
* \returns 0 on success, or -1 on error.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_LinuxSetThreadPriorityAndPolicy(Sint64 threadID, int sdlPriority, int schedPolicy);
|
||||
|
||||
#endif /* __LINUX__ */
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue