remove useless visibility application from static-linking-only code
[musl] / src / env / __reset_tls.c
1 #ifndef SHARED
2
3 #include <string.h>
4 #include "pthread_impl.h"
5
6 extern struct tls_image {
7         void *image;
8         size_t len, size, align;
9 } __static_tls;
10
11 #define T __static_tls
12
13 void __reset_tls()
14 {
15         if (!T.size) return;
16         pthread_t self = __pthread_self();
17         memcpy(self->dtv[1], T.image, T.len);
18         memset((char *)self->dtv[1]+T.len, 0, T.size-T.len);
19 }
20
21 #endif