From 05b3b876e63cdc919c79f5127a7ae8dbdb7b095f Mon Sep 17 00:00:00 2001 From: Marcin Kolny Date: Mon, 19 Sep 2022 21:53:39 +0100 Subject: [PATCH] make `__get_tp()` a static function (#327) 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 | 1 - libc-top-half/musl/arch/wasm32/pthread_arch.h | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/expected/wasm32-wasi/posix/defined-symbols.txt b/expected/wasm32-wasi/posix/defined-symbols.txt index 538e622..30bf29e 100644 --- a/expected/wasm32-wasi/posix/defined-symbols.txt +++ b/expected/wasm32-wasi/posix/defined-symbols.txt @@ -79,7 +79,6 @@ __fwritable __fwritex __fwriting __get_locale -__get_tp __getdelim __getentropy __getopt_msg diff --git a/libc-top-half/musl/arch/wasm32/pthread_arch.h b/libc-top-half/musl/arch/wasm32/pthread_arch.h index f2410bd..e23eaf8 100644 --- a/libc-top-half/musl/arch/wasm32/pthread_arch.h +++ b/libc-top-half/musl/arch/wasm32/pthread_arch.h @@ -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" -- 2.39.2