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

@ -100,7 +100,9 @@ main(int argc, char **argv)
init_sem);
/* Create all the threads */
for (i = 0; i < NUM_THREADS; ++i) {
threads[i] = SDL_CreateThread(ThreadFunc, (void *) i);
char name[64];
SDL_snprintf(name, sizeof (name), "Thread%u", (unsigned int) i);
threads[i] = SDL_CreateThread(ThreadFunc, name, (void *) i);
}
/* Wait 10 seconds */