xref: /aosp_15_r20/external/musl/src/thread/pthread_getspecific.c (revision c9945492fdd68bbe62686c5b452b4dc1be3f8453)
1*c9945492SAndroid Build Coastguard Worker #include "pthread_impl.h"
2*c9945492SAndroid Build Coastguard Worker #include <threads.h>
3*c9945492SAndroid Build Coastguard Worker 
__pthread_getspecific(pthread_key_t k)4*c9945492SAndroid Build Coastguard Worker static void *__pthread_getspecific(pthread_key_t k)
5*c9945492SAndroid Build Coastguard Worker {
6*c9945492SAndroid Build Coastguard Worker 	struct pthread *self = __pthread_self();
7*c9945492SAndroid Build Coastguard Worker 	return self->tsd[k];
8*c9945492SAndroid Build Coastguard Worker }
9*c9945492SAndroid Build Coastguard Worker 
10*c9945492SAndroid Build Coastguard Worker weak_alias(__pthread_getspecific, pthread_getspecific);
11*c9945492SAndroid Build Coastguard Worker weak_alias(__pthread_getspecific, tss_get);
12