diff options
author | Waldemar Brodkorb <wbx@uclibc-ng.org> | 2016-09-24 02:55:31 +0200 |
---|---|---|
committer | Waldemar Brodkorb <wbx@uclibc-ng.org> | 2016-09-26 20:23:24 +0200 |
commit | 29ff9055c80efe77a7130767a9fcb3ab8c67e8ce (patch) | |
tree | b061656c1336d7d73ed5eef59352e3d50d8147a7 /libpthread/nptl/sysdeps/unix/sysv/linux/libc_pthread_init.c | |
parent | b06f85d62c41a4ed108628b1c564203f36c0ab4e (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/nptl/sysdeps/unix/sysv/linux/libc_pthread_init.c')
-rw-r--r-- | libpthread/nptl/sysdeps/unix/sysv/linux/libc_pthread_init.c | 24 |
1 files changed, 1 insertions, 23 deletions
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 |