Go back to old rthreads TLS code for now

This commit is contained in:
LibretroAdmin 2025-07-18 18:18:30 +02:00
parent 25546f864a
commit 58b686f661
1 changed files with 6 additions and 6 deletions

View File

@ -765,8 +765,8 @@ bool sthread_tls_delete(sthread_tls_t *tls)
#ifdef USE_WIN32_THREADS
return TlsFree(*tls) != 0;
#else
pthread_key_t key = (pthread_key_t)tls;
return pthread_key_delete(key) == 0;
/* TODO/FIXME - broken for UCRT */
return pthread_key_delete(*tls) == 0;
#endif
}
@ -775,8 +775,8 @@ void *sthread_tls_get(sthread_tls_t *tls)
#ifdef USE_WIN32_THREADS
return TlsGetValue(*tls);
#else
pthread_key_t key = (pthread_key_t)tls;
return pthread_getspecific(key);
/* TODO/FIXME - broken for UCRT */
return pthread_getspecific(*tls);
#endif
}
@ -785,8 +785,8 @@ bool sthread_tls_set(sthread_tls_t *tls, const void *data)
#ifdef USE_WIN32_THREADS
return TlsSetValue(*tls, (void*)data) != 0;
#else
pthread_key_t key = (pthread_key_t)tls;
return pthread_setspecific(key, data) == 0;
/* TODO/FIXME - broken for UCRT */
return pthread_setspecific(*tls, data) == 0;
#endif
}
#endif