1.3 API CHANGE: Add support for naming threads.

--HG--
extra : rebase_source : ae532d4b4d68ef86de0fc2cb6794a622e0841bce
This commit is contained in:
Ryan C. Gordon 2011-10-02 00:29:16 -04:00
parent dead491b27
commit 0863dee582
22 changed files with 183 additions and 45 deletions

View file

@ -209,6 +209,7 @@ SDL_TimerInit(void)
SDL_TimerData *data = &SDL_timer_data;
if (!data->active) {
const char *name = "SDLTimer";
data->timermap_lock = SDL_CreateMutex();
if (!data->timermap_lock) {
return -1;
@ -224,9 +225,9 @@ SDL_TimerInit(void)
/* !!! FIXME: this is nasty. */
#if (defined(__WIN32__) && !defined(_WIN32_WCE)) && !defined(HAVE_LIBC)
#undef SDL_CreateThread
data->thread = SDL_CreateThread(SDL_TimerThread, data, NULL, NULL);
data->thread = SDL_CreateThread(SDL_TimerThread, name, data, NULL, NULL);
#else
data->thread = SDL_CreateThread(SDL_TimerThread, data);
data->thread = SDL_CreateThread(SDL_TimerThread, name, data);
#endif
if (!data->thread) {
SDL_TimerQuit();