summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJakob Kaivo <jkk@ung.org>2020-08-12 13:30:09 -0400
committerJakob Kaivo <jkk@ung.org>2020-08-12 13:30:09 -0400
commitfb7ff6c8bfd3ce70986b602b087dd372c74915bd (patch)
tree5c08efc7d0c8e1ba05c78c155b3c8c6885dc2a7f /src
parent1e04052f49c8fa26213de2a0a7e9d43ad873d5a1 (diff)
remove unused __pthread_per_thread()
Diffstat (limited to 'src')
-rw-r--r--src/nonstd/__pthread_per_thread.c28
1 files changed, 0 insertions, 28 deletions
diff --git a/src/nonstd/__pthread_per_thread.c b/src/nonstd/__pthread_per_thread.c
deleted file mode 100644
index 9217a64a..00000000
--- a/src/nonstd/__pthread_per_thread.c
+++ /dev/null
@@ -1,28 +0,0 @@
-#if defined _POSIX_C_SOURCE && 199506L <= _POSIX_C_SOURCE
-
-#include "pthread.h"
-
-static pthread_key_t __per_thread_key;
-
-static void __make_key(void)
-{
- pthread_key_create(&__per_thread_key, NULL);
-}
-
-static struct per_thread *per_thread(void)
-{
- static pthread_once_t key_once = PTHREAD_ONCE_INIT;
- struct per_thread *pt;
- pthread_once(&key_once, __make_key);
- if ((pt = pthread_getspecific(__per_thread_key)) == NULL) {
- pt = calloc(1, sizeof (*pt));
- pthread_setspecific(__per_thread_key, pt);
- }
- return pt;
-}
-#endif
-
-/*
-LINK(pthread)
-POSIX(199506)
-*/