SDL_SetLinuxThreadPriorityAndPolicy

Function SDL_SetLinuxThreadPriorityAndPolicy 

Source
pub unsafe extern "C" fn SDL_SetLinuxThreadPriorityAndPolicy(
    threadID: Sint64,
    sdlPriority: c_int,
    schedPolicy: c_int,
) -> bool
Expand description

Sets the priority (not nice level) and scheduling policy for a thread.

This uses setpriority() if possible, and RealtimeKit if available.

§Parameters

  • threadID: the Unix thread ID to change priority of.
  • sdlPriority: the new SDL_ThreadPriority value.
  • schedPolicy: the new scheduling policy (SCHED_FIFO, SCHED_RR, SCHED_OTHER, etc…).

§Return value

Returns true on success or false on failure; call SDL_GetError() for more information.

§Availability

This function is available since SDL 3.2.0.