comparison src/thread/pthread/SDL_systhread.c @ 2779:4436464c4f51

Fixed Bugzilla bug #205 Removed SDL_KillThread() from the API, as it isn't safe on many platforms.
author Sam Lantinga <slouken@libsdl.org>
date Mon, 24 Nov 2008 00:18:42 +0000
parents c121d94672cb
children 99210400e8b9
comparison
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: */