path: root/libpthread/linuxthreads/libc_pthread_init.c
diff options
authorWaldemar Brodkorb <>2016-09-24 00:55:31 (GMT)
committerWaldemar Brodkorb <>2016-09-26 18:23:24 (GMT)
commit29ff9055c80efe77a7130767a9fcb3ab8c67e8ce (patch)
treeb061656c1336d7d73ed5eef59352e3d50d8147a7 /libpthread/linuxthreads/libc_pthread_init.c
parentb06f85d62c41a4ed108628b1c564203f36c0ab4e (diff)
use a single libc and deduplicate threading code
Similar to musl libc a single libc has many benefits and solves some open issues with uClibc-ng. - no pthread_mutex_* weak symbols exported anymore - applications no longer failing to link when either -lrt or -lpthread are missing for dynamic and static linking mode - smaller C library - slightly better runtime performance
Diffstat (limited to 'libpthread/linuxthreads/libc_pthread_init.c')
1 files changed, 1 insertions, 10 deletions
diff --git a/libpthread/linuxthreads/libc_pthread_init.c b/libpthread/linuxthreads/libc_pthread_init.c
index b64da05..26f1abc 100644
--- a/libpthread/linuxthreads/libc_pthread_init.c
+++ b/libpthread/linuxthreads/libc_pthread_init.c
@@ -18,20 +18,11 @@
#include <locale.h>
#include <string.h>
-#include <linuxthreads/sysdeps/pthread/pthread-functions.h>
int __libc_multiple_threads attribute_hidden __attribute__((nocommon));
-int * __libc_pthread_init (const struct pthread_functions *functions)
+int * __libc_pthread_init (void)
-#ifdef SHARED
- /* We copy the content of the variable pointed to by the FUNCTIONS
- parameter to one in since this means access to the array
- can be done with one memory access instead of two. */
- memcpy (&__libc_pthread_functions, functions,
- sizeof (__libc_pthread_functions));
#if !defined __UCLIBC_HAS_TLS__ && defined __UCLIBC_HAS_XLOCALE__
/* Initialize thread-locale current locale to point to the global one.