summaryrefslogtreecommitdiff
path: root/src/thread/pthread_key_create.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/thread/pthread_key_create.c')
-rw-r--r--src/thread/pthread_key_create.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/thread/pthread_key_create.c b/src/thread/pthread_key_create.c
index c9ca48ab..e51cb023 100644
--- a/src/thread/pthread_key_create.c
+++ b/src/thread/pthread_key_create.c
@@ -14,7 +14,7 @@ int pthread_key_create(pthread_key_t *k, void (*dtor)(void *))
unsigned i = (uintptr_t)&k / 16 % PTHREAD_KEYS_MAX;
unsigned j = i;
- pthread_self();
+ __pthread_self_init();
if (!dtor) dtor = nodtor;
do {
if (!a_cas_p(keys+j, 0, dtor)) {