projects
/
musl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
re-enable vdso clock_gettime on arm (32-bit) with workaround
[musl]
/
src
/
thread
/
pthread_key_create.c
diff --git
a/src/thread/pthread_key_create.c
b/src/thread/pthread_key_create.c
index
210605c
..
d112094
100644
(file)
--- a/
src/thread/pthread_key_create.c
+++ b/
src/thread/pthread_key_create.c
@@
-22,7
+22,6
@@
weak_alias(dummy_0, __tl_unlock);
int __pthread_key_create(pthread_key_t *k, void (*dtor)(void *))
{
int __pthread_key_create(pthread_key_t *k, void (*dtor)(void *))
{
- pthread_key_t j = next_key;
pthread_t self = __pthread_self();
/* This can only happen in the main thread before
pthread_t self = __pthread_self();
/* This can only happen in the main thread before
@@
-33,6
+32,7
@@
int __pthread_key_create(pthread_key_t *k, void (*dtor)(void *))
if (!dtor) dtor = nodtor;
__pthread_rwlock_wrlock(&key_lock);
if (!dtor) dtor = nodtor;
__pthread_rwlock_wrlock(&key_lock);
+ pthread_key_t j = next_key;
do {
if (!keys[j]) {
keys[next_key = *k = j] = dtor;
do {
if (!keys[j]) {
keys[next_key = *k = j] = dtor;