From 29ff9055c80efe77a7130767a9fcb3ab8c67e8ce Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Sat, 24 Sep 2016 02:55:31 +0200 Subject: 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 --- .../sysdeps/unix/sysv/linux/libc_pthread_init.c | 24 +--------------------- 1 file changed, 1 insertion(+), 23 deletions(-) (limited to 'libpthread/nptl/sysdeps/unix/sysv/linux/libc_pthread_init.c') diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/libc_pthread_init.c b/libpthread/nptl/sysdeps/unix/sysv/linux/libc_pthread_init.c index cc8d39090..0df9951a8 100644 --- a/libpthread/nptl/sysdeps/unix/sysv/linux/libc_pthread_init.c +++ b/libpthread/nptl/sysdeps/unix/sysv/linux/libc_pthread_init.c @@ -37,8 +37,7 @@ int * #endif __libc_pthread_init ( unsigned long int *ptr, - void (*reclaim) (void), - const struct pthread_functions *functions) + void (*reclaim) (void)) { /* Remember the pointer to the generation counter in libpthread. */ __fork_generation_pointer = ptr; @@ -46,28 +45,7 @@ __libc_pthread_init ( /* Called by a child after fork. */ __register_atfork (NULL, NULL, reclaim, NULL); -#ifdef SHARED - /* We copy the content of the variable pointed to by the FUNCTIONS - parameter to one in libc.so 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)); - __libc_pthread_functions_init = 1; -#endif - #ifndef TLS_MULTIPLE_THREADS_IN_TCB return &__libc_multiple_threads; #endif } - -#ifdef SHARED -#if 0 -void -libc_freeres_fn (freeres_libptread) -{ - if (__libc_pthread_functions_init) - PTHFCT_CALL (ptr_freeres, ()); -} -#endif -#endif -- cgit v1.2.3