summaryrefslogtreecommitdiff
path: root/libpthread/nptl/forward.c
diff options
context:
space:
mode:
authorAustin Foxley <austinf@cetoncorp.com>2010-02-16 12:27:18 -0800
committerAustin Foxley <austinf@cetoncorp.com>2010-02-16 12:27:18 -0800
commita032a6587011cbdac8c2f7e11f15dc4e592bbb55 (patch)
treeb8d8dfc6abf0168e098223c2134a3e4bd7640942 /libpthread/nptl/forward.c
parent70f1d42b13a741f603472f405299e5d2938aa728 (diff)
mass sync with glibc nptl
Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
Diffstat (limited to 'libpthread/nptl/forward.c')
-rw-r--r--libpthread/nptl/forward.c32
1 files changed, 7 insertions, 25 deletions
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 <drepper@redhat.com>, 2002.
@@ -21,22 +21,24 @@
#include <pthreadP.h>
#include <signal.h>
#include <stdlib.h>
+
#include <atomic.h>
#include <sysdep.h>
/* 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);