src/thread/SDL_thread.c
changeset 8922 dfb6f8611ebe
parent 8149 681eb46b8ac4
child 9619 b94b6d0bff0f
     1.1 --- a/src/thread/SDL_thread.c	Wed Jun 25 00:20:21 2014 -0700
     1.2 +++ b/src/thread/SDL_thread.c	Wed Jun 25 00:43:10 2014 -0700
     1.3 @@ -442,10 +442,10 @@
     1.4          SDL_SYS_DetachThread(thread);
     1.5      } else {
     1.6          /* all other states are pretty final, see where we landed. */
     1.7 -        const int state = SDL_AtomicGet(&thread->state);
     1.8 -        if ((state == SDL_THREAD_STATE_DETACHED) || (state == SDL_THREAD_STATE_CLEANED)) {
     1.9 +        const int thread_state = SDL_AtomicGet(&thread->state);
    1.10 +        if ((thread_state == SDL_THREAD_STATE_DETACHED) || (thread_state == SDL_THREAD_STATE_CLEANED)) {
    1.11              return;  /* already detached (you shouldn't call this twice!) */
    1.12 -        } else if (state == SDL_THREAD_STATE_ZOMBIE) {
    1.13 +        } else if (thread_state == SDL_THREAD_STATE_ZOMBIE) {
    1.14              SDL_WaitThread(thread, NULL);  /* already done, clean it up. */
    1.15          } else {
    1.16              SDL_assert(0 && "Unexpected thread state");