src/thread/SDL_thread.c
changeset 7730 e928464b98ec
parent 7606 bb2aa25cca1c
child 7978 70ac84e49797
     1.1 --- a/src/thread/SDL_thread.c	Thu Sep 05 07:02:27 2013 -0700
     1.2 +++ b/src/thread/SDL_thread.c	Thu Sep 05 07:15:26 2013 -0700
     1.3 @@ -125,6 +125,7 @@
     1.4      SDL_TLSEntry *entry;
     1.5      SDL_TLSData *storage = NULL;
     1.6  
     1.7 +#if !SDL_THREADS_DISABLED
     1.8      if (!SDL_generic_TLS_mutex) {
     1.9          static SDL_SpinLock tls_lock;
    1.10          SDL_AtomicLock(&tls_lock);
    1.11 @@ -139,6 +140,7 @@
    1.12          }
    1.13          SDL_AtomicUnlock(&tls_lock);
    1.14      }
    1.15 +#endif /* SDL_THREADS_DISABLED */
    1.16  
    1.17      SDL_MemoryBarrierAcquire();
    1.18      SDL_LockMutex(SDL_generic_TLS_mutex);
    1.19 @@ -148,7 +150,9 @@
    1.20              break;
    1.21          }
    1.22      }
    1.23 +#if !SDL_THREADS_DISABLED
    1.24      SDL_UnlockMutex(SDL_generic_TLS_mutex);
    1.25 +#endif
    1.26  
    1.27      return storage;
    1.28  }