From a032a6587011cbdac8c2f7e11f15dc4e592bbb55 Mon Sep 17 00:00:00 2001 From: Austin Foxley Date: Tue, 16 Feb 2010 12:27:18 -0800 Subject: mass sync with glibc nptl Signed-off-by: Austin Foxley --- libpthread/nptl/forward.c | 32 +++++++------------------------- 1 file changed, 7 insertions(+), 25 deletions(-) (limited to 'libpthread/nptl/forward.c') diff --git a/libpthread/nptl/forward.c b/libpthread/nptl/forward.c index 5b71f8e67..4c5ada349 100644 --- a/libpthread/nptl/forward.c +++ b/libpthread/nptl/forward.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc. +/* Copyright (C) 2002, 2003, 2004, 2007 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 2002. @@ -21,22 +21,24 @@ #include #include #include + #include #include /* Pointers to the libc functions. */ struct pthread_functions __libc_pthread_functions attribute_hidden; +int __libc_pthread_functions_init attribute_hidden; #define FORWARD2(name, rettype, decl, params, defaction) \ rettype \ name decl \ { \ - if (__libc_pthread_functions.ptr_##name == NULL) \ + if (!__libc_pthread_functions_init) \ defaction; \ \ - return __libc_pthread_functions.ptr_##name params; \ + return PTHFCT_CALL (ptr_##name, params); \ } #define FORWARD(name, decl, params, defretval) \ @@ -123,34 +125,13 @@ FORWARD (pthread_setschedparam, FORWARD (pthread_mutex_destroy, (pthread_mutex_t *mutex), (mutex), 0) -libc_hidden_proto(pthread_mutex_init) FORWARD (pthread_mutex_init, (pthread_mutex_t *mutex, const pthread_mutexattr_t *mutexattr), (mutex, mutexattr), 0) -strong_alias(pthread_mutex_init, __pthread_mutex_init) -libc_hidden_def(pthread_mutex_init) - -libc_hidden_proto(pthread_mutex_trylock) -FORWARD (pthread_mutex_trylock, (pthread_mutex_t *mutex), (mutex), 0) -strong_alias(pthread_mutex_trylock, __pthread_mutex_trylock) -libc_hidden_def(pthread_mutex_trylock) -libc_hidden_proto(pthread_mutex_lock) FORWARD (pthread_mutex_lock, (pthread_mutex_t *mutex), (mutex), 0) -strong_alias(pthread_mutex_lock, __pthread_mutex_lock) -libc_hidden_def(pthread_mutex_lock) -libc_hidden_proto(pthread_mutex_unlock) FORWARD (pthread_mutex_unlock, (pthread_mutex_t *mutex), (mutex), 0) -strong_alias(pthread_mutex_unlock, __pthread_mutex_unlock) -libc_hidden_def(pthread_mutex_unlock) - -FORWARD (pthread_mutexattr_init, (pthread_mutexattr_t *attr), (attr), 0) - -FORWARD (pthread_mutexattr_destroy, (pthread_mutexattr_t *attr), (attr), 0) - -FORWARD (pthread_mutexattr_settype, (pthread_mutexattr_t *attr, int kind), - (attr, kind), 0) FORWARD2 (pthread_self, pthread_t, (void), (), return 0) @@ -163,7 +144,8 @@ FORWARD (pthread_setcanceltype, (int type, int *oldtype), (type, oldtype), 0) #define return /* value is void */ FORWARD2(__pthread_unwind, - void attribute_hidden __attribute ((noreturn)) __cleanup_fct_attribute, + void attribute_hidden __attribute ((noreturn)) __cleanup_fct_attribute + attribute_compat_text_section, (__pthread_unwind_buf_t *buf), (buf), { /* We cannot call abort() here. */ INTERNAL_SYSCALL_DECL (err); -- cgit v1.2.3