move declarations of tls setup/access functions to pthread_impl.h
[musl] / src / thread / __tls_get_addr.c
1 #include <stddef.h>
2 #include "pthread_impl.h"
3 #include "libc.h"
4
5 void *__tls_get_addr(tls_mod_off_t *v)
6 {
7         pthread_t self = __pthread_self();
8         if (v[0]<=(size_t)self->dtv[0])
9                 return (char *)self->dtv[v[0]]+v[1]+DTP_OFFSET;
10         return __tls_get_new(v);
11 }
12
13 weak_alias(__tls_get_addr, __tls_get_new);