include/SDL_thread.h
changeset 5506 82a09d5d0f07
parent 5262 b530ef003506
child 5509 5b1b4d820d10
     1.1 --- a/include/SDL_thread.h	Fri Mar 25 10:26:25 2011 -0700
     1.2 +++ b/include/SDL_thread.h	Fri Mar 25 10:47:49 2011 -0700
     1.3 @@ -50,6 +50,16 @@
     1.4  /* The SDL thread ID */
     1.5  typedef unsigned long SDL_threadID;
     1.6  
     1.7 +/* The SDL thread priority
     1.8 + *
     1.9 + * Note: On many systems you require special privileges to set high priority.
    1.10 + */
    1.11 +typedef enum {
    1.12 +    SDL_THREAD_PRIORITY_LOW,
    1.13 +    SDL_THREAD_PRIORITY_NORMAL,
    1.14 +    SDL_THREAD_PRIORITY_HIGH
    1.15 +} SDL_ThreadPriority;
    1.16 +
    1.17  /* The function passed to SDL_CreateThread()
    1.18     It is passed a void* user context parameter and returns an int.
    1.19   */
    1.20 @@ -147,6 +157,11 @@
    1.21  extern DECLSPEC SDL_threadID SDLCALL SDL_GetThreadID(SDL_Thread * thread);
    1.22  
    1.23  /**
    1.24 + *  Set the thread priority
    1.25 + */
    1.26 +extern DECLSPEC int SDLCALL SDL_SetThreadPriority(SDL_Thread * thread, SDL_ThreadPriority priority);
    1.27 +
    1.28 +/**
    1.29   *  Wait for a thread to finish.
    1.30   *  
    1.31   *  The return code for the thread function is placed in the area