projects
/
musl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
optimize pthread initialization
[musl]
/
src
/
thread
/
pthread_key_create.c
diff --git
a/src/thread/pthread_key_create.c
b/src/thread/pthread_key_create.c
index
efc3804
..
52c0973
100644
(file)
--- a/
src/thread/pthread_key_create.c
+++ b/
src/thread/pthread_key_create.c
@@
-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 */