summaryrefslogtreecommitdiffstats
path: root/libc-top-half/musl/src/thread/pthread_getspecific.c
diff options
context:
space:
mode:
Diffstat (limited to 'libc-top-half/musl/src/thread/pthread_getspecific.c')
-rw-r--r--libc-top-half/musl/src/thread/pthread_getspecific.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/libc-top-half/musl/src/thread/pthread_getspecific.c b/libc-top-half/musl/src/thread/pthread_getspecific.c
new file mode 100644
index 0000000..d9342a5
--- /dev/null
+++ b/libc-top-half/musl/src/thread/pthread_getspecific.c
@@ -0,0 +1,11 @@
+#include "pthread_impl.h"
+#include <threads.h>
+
+static void *__pthread_getspecific(pthread_key_t k)
+{
+ struct pthread *self = __pthread_self();
+ return self->tsd[k];
+}
+
+weak_alias(__pthread_getspecific, pthread_getspecific);
+weak_alias(__pthread_getspecific, tss_get);