Mercurial > sdl-ios-xcode
comparison src/thread/SDL_thread.c @ 4661:03dcb795c583
Merged changes from the main SDL codebase
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Mon, 12 Jul 2010 21:09:23 -0700 |
parents | 791b3256fb22 |
children | b530ef003506 |
comparison
equal
deleted
inserted
replaced
4660:b15e7017409b | 4661:03dcb795c583 |
---|---|
36 static int SDL_maxthreads = 0; | 36 static int SDL_maxthreads = 0; |
37 static int SDL_numthreads = 0; | 37 static int SDL_numthreads = 0; |
38 static SDL_Thread **SDL_Threads = NULL; | 38 static SDL_Thread **SDL_Threads = NULL; |
39 static SDL_mutex *thread_lock = NULL; | 39 static SDL_mutex *thread_lock = NULL; |
40 | 40 |
41 int | 41 static int |
42 SDL_ThreadsInit(void) | 42 SDL_ThreadsInit(void) |
43 { | 43 { |
44 int retval; | 44 int retval; |
45 | 45 |
46 retval = 0; | 46 retval = 0; |
54 /* This should never be called... | 54 /* This should never be called... |
55 If this is called by SDL_Quit(), we don't know whether or not we should | 55 If this is called by SDL_Quit(), we don't know whether or not we should |
56 clean up threads here. If any threads are still running after this call, | 56 clean up threads here. If any threads are still running after this call, |
57 they will no longer have access to any per-thread data. | 57 they will no longer have access to any per-thread data. |
58 */ | 58 */ |
59 void | 59 static void |
60 SDL_ThreadsQuit(void) | 60 SDL_ThreadsQuit(void) |
61 { | 61 { |
62 SDL_mutex *mutex; | 62 SDL_mutex *mutex; |
63 | 63 |
64 mutex = thread_lock; | 64 mutex = thread_lock; |
303 id = SDL_ThreadID(); | 303 id = SDL_ThreadID(); |
304 } | 304 } |
305 return id; | 305 return id; |
306 } | 306 } |
307 | 307 |
308 void | |
309 SDL_KillThread(SDL_Thread * thread) | |
310 { | |
311 /* This is a no-op in SDL 1.3 and later. */ | |
312 } | |
313 | |
314 /* vi: set ts=4 sw=4 expandtab: */ | 308 /* vi: set ts=4 sw=4 expandtab: */ |