mirror of https://git.musl-libc.org/git/musl
Browse Source
with the availability of the thread list, there is no need to mark tsd key slots dirty and clean them up only when a free slot can't be found. instead, directly iterate threads and clear any value associated with the key being deleted. no synchronization is necessary for the clearing, since there is no way the slot can be accessed without having synchronized with the creation of a new key occupying the same slot, which is already sequenced after and synchronized with the deletion of the old key.master
2 changed files with 19 additions and 75 deletions
@ -1,14 +0,0 @@ |
|||
#include "pthread_impl.h" |
|||
#include "libc.h" |
|||
|
|||
void __pthread_key_delete_synccall(void (*f)(void *), void *p) |
|||
{ |
|||
__synccall(f, p); |
|||
} |
|||
|
|||
int __pthread_key_delete(pthread_key_t k) |
|||
{ |
|||
return __pthread_key_delete_impl(k); |
|||
} |
|||
|
|||
weak_alias(__pthread_key_delete, pthread_key_delete); |
|||
Loading…
Reference in new issue