mirror of
https://github.com/fluencelabs/musl
synced 2025-07-03 16:41:59 +00:00
optimize POSIX TSD for fast pthread_getspecific
This commit is contained in:
@ -12,6 +12,7 @@ int pthread_key_create(pthread_key_t *k, void (*dtor)(void *))
|
||||
int i = (uintptr_t)&k / 16 % PTHREAD_KEYS_MAX;
|
||||
int j = i;
|
||||
|
||||
pthread_self();
|
||||
libc.tsd_keys = keys;
|
||||
if (!dtor) dtor = nodtor;
|
||||
/* Cheap trick - &k cannot match any destructor pointer */
|
||||
|
Reference in New Issue
Block a user