test/torturethread.c
changeset 5969 3a041d215edc
parent 5535 96594ac5fd1a
child 7517 965d57022c01
     1.1 --- a/test/torturethread.c	Tue Sep 27 23:16:04 2011 -0400
     1.2 +++ b/test/torturethread.c	Sun Oct 02 00:29:16 2011 -0400
     1.3 @@ -52,8 +52,10 @@
     1.4      fprintf(stderr, "Creating Thread %d\n", tid);
     1.5  
     1.6      for (i = 0; i < NUMTHREADS; i++) {
     1.7 +        char name[64];
     1.8 +        SDL_snprintf(name, sizeof (name), "Child%d_%d", tid, i);
     1.9          flags[i] = 0;
    1.10 -        sub_threads[i] = SDL_CreateThread(SubThreadFunc, &flags[i]);
    1.11 +        sub_threads[i] = SDL_CreateThread(SubThreadFunc, name, &flags[i]);
    1.12      }
    1.13  
    1.14      printf("Thread '%d' waiting for signal\n", tid);
    1.15 @@ -86,8 +88,10 @@
    1.16  
    1.17      signal(SIGSEGV, SIG_DFL);
    1.18      for (i = 0; i < NUMTHREADS; i++) {
    1.19 +        char name[64];
    1.20 +        SDL_snprintf(name, sizeof (name), "Parent%d", i);
    1.21          time_for_threads_to_die[i] = 0;
    1.22 -        threads[i] = SDL_CreateThread(ThreadFunc, (void *) (uintptr_t) i);
    1.23 +        threads[i] = SDL_CreateThread(ThreadFunc, name, (void*) (uintptr_t) i);
    1.24  
    1.25          if (threads[i] == NULL) {
    1.26              fprintf(stderr, "Couldn't create thread: %s\n", SDL_GetError());