diff options
Diffstat (limited to 'libc-top-half/musl/src/thread/pthread_self.c')
-rw-r--r-- | libc-top-half/musl/src/thread/pthread_self.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/libc-top-half/musl/src/thread/pthread_self.c b/libc-top-half/musl/src/thread/pthread_self.c new file mode 100644 index 0000000..1f3eee1 --- /dev/null +++ b/libc-top-half/musl/src/thread/pthread_self.c @@ -0,0 +1,15 @@ +#include "pthread_impl.h" +#include <threads.h> + +#if !defined(__wasilibc_unmodified_upstream) && defined(__wasm__) && \ + defined(_REENTRANT) +_Thread_local struct pthread __wasilibc_pthread_self; +#endif + +static pthread_t __pthread_self_internal() +{ + return __pthread_self(); +} + +weak_alias(__pthread_self_internal, pthread_self); +weak_alias(__pthread_self_internal, thrd_current); |