We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
pthread_self
1 parent 33d6bc7 commit 15f0553Copy full SHA for 15f0553
libc-top-half/musl/src/thread/pthread_self.c
@@ -1,6 +1,12 @@
1
#include "pthread_impl.h"
2
#include <threads.h>
3
4
+#if defined(_REENTRANT)
5
+// We need some place to store the thread ID. This WebAssembly global fits the
6
+// bill and is used by `__get_tp` elsewhere.
7
+__asm__(".globaltype __wasilibc_pthread_self, i32\n");
8
+#endif
9
+
10
static pthread_t __pthread_self_internal()
11
{
12
return __pthread_self();
0 commit comments