tls: wrap reference to a mutex into an #if !SDL_THREADS_DISABLED test.

main
Ryan C. Gordon 2021-04-02 14:36:53 -04:00
parent dbdbae44c5
commit 7d02248cf5
No known key found for this signature in database
GPG Key ID: FA148B892AB48044
1 changed files with 2 additions and 2 deletions

View File

@ -141,10 +141,10 @@ SDL_Generic_GetTLSData(void)
}
SDL_AtomicUnlock(&tls_lock);
}
#endif /* SDL_THREADS_DISABLED */
SDL_MemoryBarrierAcquire();
SDL_LockMutex(SDL_generic_TLS_mutex);
#endif /* SDL_THREADS_DISABLED */
for (entry = SDL_generic_TLS; entry; entry = entry->next) {
if (entry->thread == thread) {
storage = entry->storage;