move declarations of tls setup/access functions to pthread_impl.h
authorRich Felker <dalias@aerifal.cx>
Sat, 8 Sep 2018 22:46:06 +0000 (18:46 -0400)
committerRich Felker <dalias@aerifal.cx>
Wed, 12 Sep 2018 18:34:31 +0000 (14:34 -0400)
it's already included in all places where these are needed, and aside
from __tls_get_addr, they're all implementation internals.

ldso/dynlink.c
src/internal/pthread_impl.h
src/thread/__tls_get_addr.c
src/thread/pthread_create.c
src/time/timer_create.c

index 1d3dacc..f78a02e 100644 (file)
@@ -96,9 +96,7 @@ struct symdef {
        struct dso *dso;
 };
 
-int __init_tp(void *);
 void __init_libc(char **, char *);
-void *__copy_tls(unsigned char *);
 
 static struct builtin_tls {
        char c;
@@ -1892,8 +1890,6 @@ static void *addr2dso(size_t a)
        return 0;
 }
 
-void *__tls_get_addr(tls_mod_off_t *);
-
 static void *do_dlsym(struct dso *p, const char *s, void *ra)
 {
        size_t i;
index d4d1dc6..3479bcf 100644 (file)
@@ -135,6 +135,12 @@ struct __timer {
        ((sigset_t *)(const unsigned long [_NSIG/8/sizeof(long)]){ \
         0x80000000 })
 
+void *__tls_get_addr(tls_mod_off_t *);
+hidden void *__tls_get_new(tls_mod_off_t *);
+int __init_tp(void *);
+void *__copy_tls(unsigned char *);
+void __reset_tls();
+
 int __clone(int (*)(void *), void *, int, void *, ...);
 int __set_thread_area(void *);
 int __libc_sigaction(int, const struct sigaction *, struct sigaction *);
index 3bc6057..013817b 100644 (file)
@@ -2,8 +2,6 @@
 #include "pthread_impl.h"
 #include "libc.h"
 
-hidden void *__tls_get_new(tls_mod_off_t *);
-
 void *__tls_get_addr(tls_mod_off_t *v)
 {
        pthread_t self = __pthread_self();
index 27ace2c..dc869dc 100644 (file)
@@ -178,8 +178,6 @@ static void init_file_lock(FILE *f)
        if (f && f->lock<0) f->lock = 0;
 }
 
-void *__copy_tls(unsigned char *);
-
 int __pthread_create(pthread_t *restrict res, const pthread_attr_t *restrict attrp, void *(*entry)(void *), void *restrict arg)
 {
        int ret, c11 = (attrp == __ATTRP_C11_THREAD);
index 16432be..ad7a264 100644 (file)
@@ -19,8 +19,6 @@ static void dummy_0()
 }
 weak_alias(dummy_0, __pthread_tsd_run_dtors);
 
-void __reset_tls();
-
 static void cleanup_fromsig(void *p)
 {
        pthread_t self = __pthread_self();