]> git.proxmox.com Git - wasi-libc.git/commitdiff
make `__get_tp()` a static function (#327)
authorMarcin Kolny <mkolny@amazon.com>
Mon, 19 Sep 2022 20:53:39 +0000 (21:53 +0100)
committerGitHub <noreply@github.com>
Mon, 19 Sep 2022 20:53:39 +0000 (13:53 -0700)
I'm not sure if the function really has to be exported. If so, we should
probably move it to a separate compilation unit, otherwise it will be defined
multiple times (e.g. in `strerror.o` and `__lctrans.o`) causing linker errors.
However, I don't see a reason (at least for now) to export this function,
therefore making it static in this PR.

expected/wasm32-wasi/posix/defined-symbols.txt
libc-top-half/musl/arch/wasm32/pthread_arch.h

index 538e6224bc0845b8bdf5ae24f566aaa190836257..30bf29ece0bb4fc44822441d517cc61b612e9deb 100644 (file)
@@ -79,7 +79,6 @@ __fwritable
 __fwritex
 __fwriting
 __get_locale
-__get_tp
 __getdelim
 __getentropy
 __getopt_msg
index f2410bd61aa37037772ab76d7d40edee437fe35c..e23eaf8f2a6eec2776b5737aad5fe5cf9536948f 100644 (file)
@@ -1,4 +1,4 @@
-uintptr_t __get_tp(void) {
+static inline uintptr_t __get_tp(void) {
 #if _REENTRANT
   int val;
   __asm__("global.get __wasilibc_pthread_self\n"