From 71a7acbd4e8bf6f42e02c04932b3e13a5452b399 Mon Sep 17 00:00:00 2001 From: "Peter S. Mazinger" Date: Wed, 27 Apr 2011 17:07:16 +0200 Subject: linuxthreads.old: cleanup a bit Use __UCLIBC_HAS_TLS__ instead of USE___THREADS (although this LT implementation will never support TLS). Disable unused/unneeded members of the pthread_functions structure. No redirect/forward for _pthread_cleanup_push/pop, it would have not worked anyway due to the fact, that the structure member was not initialized. Disable it's possible internal use in libc-lock.h. Avoid using internals.h in libc_pthread_init.c (moving a prototype to pthread-functions.h). Signed-off-by: Peter S. Mazinger Signed-off-by: Bernhard Reutner-Fischer --- libpthread/linuxthreads.old/pthread.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'libpthread/linuxthreads.old/pthread.c') diff --git a/libpthread/linuxthreads.old/pthread.c b/libpthread/linuxthreads.old/pthread.c index 0e0d69896..00197b158 100644 --- a/libpthread/linuxthreads.old/pthread.c +++ b/libpthread/linuxthreads.old/pthread.c @@ -317,7 +317,7 @@ libpthread_hidden_proto(pthread_condattr_init) struct pthread_functions __pthread_functions = { -#ifndef USE___THREAD +#if !defined __UCLIBC_HAS_TLS__ && defined __UCLIBC_HAS_RPC__ .ptr_pthread_internal_tsd_set = __pthread_internal_tsd_set, .ptr_pthread_internal_tsd_get = __pthread_internal_tsd_get, .ptr_pthread_internal_tsd_address = __pthread_internal_tsd_address, @@ -365,10 +365,10 @@ struct pthread_functions __pthread_functions = .ptr_pthread_sigwait = pthread_sigwait, .ptr_pthread_raise = pthread_raise, .ptr__pthread_cleanup_push = _pthread_cleanup_push, - .ptr__pthread_cleanup_pop = _pthread_cleanup_pop + .ptr__pthread_cleanup_pop = _pthread_cleanup_pop, */ .ptr__pthread_cleanup_push_defer = __pthread_cleanup_push_defer, - .ptr__pthread_cleanup_pop_restore = __pthread_cleanup_pop_restore, + .ptr__pthread_cleanup_pop_restore = __pthread_cleanup_pop_restore }; #ifdef SHARED # define ptr_pthread_functions &__pthread_functions @@ -526,7 +526,7 @@ int __pthread_initialize_manager(void) /* On non-MMU systems we make sure that the initial thread bounds don't overlap * with the manager stack frame */ NOMMU_INITIAL_THREAD_BOUNDS(__pthread_manager_thread_tos,__pthread_manager_thread_bos); - PDEBUG("manager stack: size=%d, bos=%p, tos=%p\n", THREAD_MANAGER_STACK_SIZE, + PDEBUG("manager stack: size=%ld, bos=%p, tos=%p\n", THREAD_MANAGER_STACK_SIZE, __pthread_manager_thread_bos, __pthread_manager_thread_tos); #if 0 PDEBUG("initial stack: estimate bos=%p, tos=%p\n", -- cgit v1.2.3