src/thread/pthread/SDL_systhread.c
changeset 2779 4436464c4f51
parent 1895 c121d94672cb
child 2859 99210400e8b9
equal deleted inserted replaced
2778:38dfc890ee6b 2779:4436464c4f51
   110 SDL_SYS_WaitThread(SDL_Thread * thread)
   110 SDL_SYS_WaitThread(SDL_Thread * thread)
   111 {
   111 {
   112     pthread_join(thread->handle, 0);
   112     pthread_join(thread->handle, 0);
   113 }
   113 }
   114 
   114 
   115 void
       
   116 SDL_SYS_KillThread(SDL_Thread * thread)
       
   117 {
       
   118 #ifdef PTHREAD_CANCEL_ASYNCHRONOUS
       
   119     pthread_cancel(thread->handle);
       
   120 #else
       
   121 #ifdef __FREEBSD__
       
   122 #warning For some reason, this doesnt actually kill a thread - FreeBSD 3.2
       
   123 #endif
       
   124     pthread_kill(thread->handle, SIGKILL);
       
   125 #endif
       
   126 }
       
   127 
       
   128 /* vi: set ts=4 sw=4 expandtab: */
   115 /* vi: set ts=4 sw=4 expandtab: */