The API sets the priority for the current thread, not an arbitrary thread.
Implemented thread priority as the 'nice' value on Linux. High priority threads require root permissions (you shouldn't give your game root permissions though!)
This commit is contained in:
parent
fb417a9de4
commit
f0b1c9b859
9 changed files with 51 additions and 28 deletions
|
@ -157,9 +157,9 @@ extern DECLSPEC SDL_threadID SDLCALL SDL_ThreadID(void);
|
|||
extern DECLSPEC SDL_threadID SDLCALL SDL_GetThreadID(SDL_Thread * thread);
|
||||
|
||||
/**
|
||||
* Set the thread priority
|
||||
* Set the priority for the current thread
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_SetThreadPriority(SDL_Thread * thread, SDL_ThreadPriority priority);
|
||||
extern DECLSPEC int SDLCALL SDL_SetThreadPriority(SDL_ThreadPriority priority);
|
||||
|
||||
/**
|
||||
* Wait for a thread to finish.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue