src/thread/SDL_thread.c
changeset 5506 82a09d5d0f07
parent 5425 346f095568ab
child 5509 5b1b4d820d10
     1.1 --- a/src/thread/SDL_thread.c	Fri Mar 25 10:26:25 2011 -0700
     1.2 +++ b/src/thread/SDL_thread.c	Fri Mar 25 10:47:49 2011 -0700
     1.3 @@ -281,6 +281,29 @@
     1.4      return (thread);
     1.5  }
     1.6  
     1.7 +SDL_threadID
     1.8 +SDL_GetThreadID(SDL_Thread * thread)
     1.9 +{
    1.10 +    SDL_threadID id;
    1.11 +
    1.12 +    if (thread) {
    1.13 +        id = thread->threadid;
    1.14 +    } else {
    1.15 +        id = SDL_ThreadID();
    1.16 +    }
    1.17 +    return id;
    1.18 +}
    1.19 +
    1.20 +int
    1.21 +SDL_SetThreadPriority(SDL_Thread * thread, SDL_ThreadPriority priority)
    1.22 +{
    1.23 +    if (!thread) {
    1.24 +        SDL_SetError("SDL_SetThreadPriority() passed NULL thread");
    1.25 +        return -1;
    1.26 +    }
    1.27 +    return SDL_SYS_SetThreadPriority(thread, priority);
    1.28 +}
    1.29 +
    1.30  void
    1.31  SDL_WaitThread(SDL_Thread * thread, int *status)
    1.32  {
    1.33 @@ -294,17 +317,4 @@
    1.34      }
    1.35  }
    1.36  
    1.37 -SDL_threadID
    1.38 -SDL_GetThreadID(SDL_Thread * thread)
    1.39 -{
    1.40 -    SDL_threadID id;
    1.41 -
    1.42 -    if (thread) {
    1.43 -        id = thread->threadid;
    1.44 -    } else {
    1.45 -        id = SDL_ThreadID();
    1.46 -    }
    1.47 -    return id;
    1.48 -}
    1.49 -
    1.50  /* vi: set ts=4 sw=4 expandtab: */