src/thread/windows/SDL_systls.c
changeset 10617 346c02ff71b6
parent 9998 f67cf37e9cd4
child 10737 3406a0f8b041
equal deleted inserted replaced
10616:d17dd08640a4 10617:346c02ff71b6
    30 
    30 
    31 static DWORD thread_local_storage = TLS_OUT_OF_INDEXES;
    31 static DWORD thread_local_storage = TLS_OUT_OF_INDEXES;
    32 static SDL_bool generic_local_storage = SDL_FALSE;
    32 static SDL_bool generic_local_storage = SDL_FALSE;
    33 
    33 
    34 SDL_TLSData *
    34 SDL_TLSData *
    35 SDL_SYS_GetTLSData()
    35 SDL_SYS_GetTLSData(void)
    36 {
    36 {
    37     if (thread_local_storage == TLS_OUT_OF_INDEXES && !generic_local_storage) {
    37     if (thread_local_storage == TLS_OUT_OF_INDEXES && !generic_local_storage) {
    38         static SDL_SpinLock lock;
    38         static SDL_SpinLock lock;
    39         SDL_AtomicLock(&lock);
    39         SDL_AtomicLock(&lock);
    40         if (thread_local_storage == TLS_OUT_OF_INDEXES && !generic_local_storage) {
    40         if (thread_local_storage == TLS_OUT_OF_INDEXES && !generic_local_storage) {