hide __pthread_once_full symbol
authorRich Felker <dalias@aerifal.cx>
Tue, 11 Sep 2018 18:56:09 +0000 (14:56 -0400)
committerRich Felker <dalias@aerifal.cx>
Wed, 12 Sep 2018 18:34:36 +0000 (14:34 -0400)
this is a special case that does not need a declaration, because it's
not even a libc-internal interface between translation units. instead
it's a poor hack around compilers' inability to shrink-wrap critical
code paths. after vis.h was disabled, it became more of a
pessimization on many archs due to the extra layer of machinery to
support a call through the PLT, but now it should be efficient again.

src/thread/pthread_once.c

index a8f8aeb..8e8d40a 100644 (file)
@@ -8,7 +8,7 @@ static void undo(void *control)
                __wake(control, -1, 1);
 }
 
-int __pthread_once_full(pthread_once_t *control, void (*init)(void))
+hidden int __pthread_once_full(pthread_once_t *control, void (*init)(void))
 {
        /* Try to enter initializing state. Four possibilities:
         *  0 - we're the first or the other cancelled; run init