blob: a6c9d215a4d47d04d92cb72f9ed834ec1183834f [file] [log] [blame]
#include "libc.h"
#include "threads_impl.h"
#include <stddef.h>
void* __tls_get_addr(size_t* v) {
thrd_t self = __thrd_current();
if (v[0] <= (size_t)self->head.dtv[0])
return (char*)self->head.dtv[v[0]] + v[1] + DTP_OFFSET;
return __tls_get_new(v);
}