Make recursive mutexes slightly faster

This commit is contained in:
Justine Tunney 2024-12-30 01:37:14 -08:00
parent 9ba5b227d9
commit c7e3d9f7ff
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
6 changed files with 12 additions and 8 deletions

View file

@ -39,7 +39,7 @@
int gettid(void) {
int tid;
if (VERY_LIKELY(__tls_enabled && !__vforked)) {
tid = atomic_load_explicit(&__get_tls()->tib_tid, memory_order_acquire);
tid = atomic_load_explicit(&__get_tls()->tib_tid, memory_order_relaxed);
if (VERY_LIKELY(tid > 0))
return tid;
}