src/thread/SDL_thread.c
changeset 5506 82a09d5d0f07
parent 5425 346f095568ab
child 5509 5b1b4d820d10
equal deleted inserted replaced
5505:c4bb4c8ea6fd 5506:82a09d5d0f07
   279 
   279 
   280     /* Everything is running now */
   280     /* Everything is running now */
   281     return (thread);
   281     return (thread);
   282 }
   282 }
   283 
   283 
       
   284 SDL_threadID
       
   285 SDL_GetThreadID(SDL_Thread * thread)
       
   286 {
       
   287     SDL_threadID id;
       
   288 
       
   289     if (thread) {
       
   290         id = thread->threadid;
       
   291     } else {
       
   292         id = SDL_ThreadID();
       
   293     }
       
   294     return id;
       
   295 }
       
   296 
       
   297 int
       
   298 SDL_SetThreadPriority(SDL_Thread * thread, SDL_ThreadPriority priority)
       
   299 {
       
   300     if (!thread) {
       
   301         SDL_SetError("SDL_SetThreadPriority() passed NULL thread");
       
   302         return -1;
       
   303     }
       
   304     return SDL_SYS_SetThreadPriority(thread, priority);
       
   305 }
       
   306 
   284 void
   307 void
   285 SDL_WaitThread(SDL_Thread * thread, int *status)
   308 SDL_WaitThread(SDL_Thread * thread, int *status)
   286 {
   309 {
   287     if (thread) {
   310     if (thread) {
   288         SDL_SYS_WaitThread(thread);
   311         SDL_SYS_WaitThread(thread);
   292         SDL_DelThread(thread);
   315         SDL_DelThread(thread);
   293         SDL_free(thread);
   316         SDL_free(thread);
   294     }
   317     }
   295 }
   318 }
   296 
   319 
   297 SDL_threadID
       
   298 SDL_GetThreadID(SDL_Thread * thread)
       
   299 {
       
   300     SDL_threadID id;
       
   301 
       
   302     if (thread) {
       
   303         id = thread->threadid;
       
   304     } else {
       
   305         id = SDL_ThreadID();
       
   306     }
       
   307     return id;
       
   308 }
       
   309 
       
   310 /* vi: set ts=4 sw=4 expandtab: */
   320 /* vi: set ts=4 sw=4 expandtab: */