summaryrefslogtreecommitdiffstats
path: root/libpthread/nptl
diff options
context:
space:
mode:
Diffstat (limited to 'libpthread/nptl')
-rw-r--r--libpthread/nptl/cleanup.c2
-rw-r--r--libpthread/nptl/compat/libc-symbols.h26
-rw-r--r--libpthread/nptl/events.c2
-rw-r--r--libpthread/nptl/forward.c13
-rw-r--r--libpthread/nptl/pt-cleanup.c2
-rw-r--r--libpthread/nptl/pthreadP.h12
-rw-r--r--libpthread/nptl/sysdeps/generic/dl-tls.c4
-rw-r--r--libpthread/nptl/sysdeps/pthread/pthread-functions.h4
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/alpha/vfork.S2
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/fork.c5
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/libc_pthread_init.c2
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/mips/Makefile.arch4
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S2
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S2
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/pt-fork.c3
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/raise.c2
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/register-atfork.c2
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/sh/pt-vfork.S1
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/sh/vfork.S2
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S2
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S2
-rw-r--r--libpthread/nptl/unwind.c2
22 files changed, 40 insertions, 58 deletions
diff --git a/libpthread/nptl/cleanup.c b/libpthread/nptl/cleanup.c
index af828c49f..5bf85398e 100644
--- a/libpthread/nptl/cleanup.c
+++ b/libpthread/nptl/cleanup.c
@@ -35,7 +35,6 @@ __pthread_register_cancel (__pthread_unwind_buf_t *buf)
/* Store the new cleanup handler info. */
THREAD_SETMEM (self, cleanup_jmp_buf, (struct pthread_unwind_buf *) buf);
}
-hidden_def (__pthread_register_cancel)
void
@@ -46,4 +45,3 @@ __pthread_unregister_cancel (__pthread_unwind_buf_t *buf)
THREAD_SETMEM (THREAD_SELF, cleanup_jmp_buf, ibuf->priv.data.prev);
}
-hidden_def (__pthread_unregister_cancel)
diff --git a/libpthread/nptl/compat/libc-symbols.h b/libpthread/nptl/compat/libc-symbols.h
index 2cc3316b5..ad34cc637 100644
--- a/libpthread/nptl/compat/libc-symbols.h
+++ b/libpthread/nptl/compat/libc-symbols.h
@@ -1,14 +1,6 @@
#ifndef _LIBC_SYMBOLS_H
#define _LIBC_SYMBOLS_H 1
-#ifndef __SYMBOL_PREFIX
-# ifndef C_SYMBOL_PREFIX
-# define __SYMBOL_PREFIX
-# else
-# define __SYMBOL_PREFIX C_SYMBOL_PREFIX
-# endif
-#endif
-
/* Handling on non-exported internal names. We have to do this only
for shared code. */
#ifdef SHARED
@@ -62,24 +54,6 @@
# define hidden_data_def(name)
# define hidden_data_ver(local, name)
-#if defined NOT_IN_libc && defined IS_IN_rtld
-# define rtld_hidden_proto(name, attrs...) hidden_proto (name, ##attrs)
-# define rtld_hidden_def(name)
-# define rtld_hidden_weak(name) hidden_weak (name)
-# define rtld_hidden_ver(local, name) hidden_ver (local, name)
-# define rtld_hidden_data_def(name) hidden_data_def (name)
-# define rtld_hidden_data_weak(name) hidden_data_weak (name)
-# define rtld_hidden_data_ver(local, name) hidden_data_ver (local, name)
-#else
-# define rtld_hidden_proto(name, attrs...)
-# define rtld_hidden_def(name)
-# define rtld_hidden_weak(name)
-# define rtld_hidden_ver(local, name)
-# define rtld_hidden_data_def(name)
-# define rtld_hidden_data_weak(name)
-# define rtld_hidden_data_ver(local, name)
-#endif
-
#if !defined NOT_IN_libc
# define libc_hidden_proto(name, attrs...) hidden_proto (name, ##attrs)
# define libc_hidden_def(name)
diff --git a/libpthread/nptl/events.c b/libpthread/nptl/events.c
index df97e54f6..8232d0c7d 100644
--- a/libpthread/nptl/events.c
+++ b/libpthread/nptl/events.c
@@ -25,10 +25,8 @@ void
__nptl_create_event (void)
{
}
-hidden_def (__nptl_create_event)
void
__nptl_death_event (void)
{
}
-hidden_def (__nptl_death_event)
diff --git a/libpthread/nptl/forward.c b/libpthread/nptl/forward.c
index e5f93d475..4958edf4a 100644
--- a/libpthread/nptl/forward.c
+++ b/libpthread/nptl/forward.c
@@ -177,10 +177,23 @@ FORWARD (pthread_mutex_destroy, (pthread_mutex_t *mutex), (mutex), 0)
FORWARD (pthread_mutex_init,
(pthread_mutex_t *mutex, const pthread_mutexattr_t *mutexattr),
(mutex, mutexattr), 0)
+hidden_strong_alias(pthread_mutex_init, __pthread_mutex_init)
+
+FORWARD (pthread_mutex_trylock, (pthread_mutex_t *mutex), (mutex), 0)
+hidden_strong_alias(pthread_mutex_trylock, __pthread_mutex_trylock)
FORWARD (pthread_mutex_lock, (pthread_mutex_t *mutex), (mutex), 0)
+hidden_strong_alias(pthread_mutex_lock, __pthread_mutex_lock)
FORWARD (pthread_mutex_unlock, (pthread_mutex_t *mutex), (mutex), 0)
+hidden_strong_alias(pthread_mutex_unlock, __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)
diff --git a/libpthread/nptl/pt-cleanup.c b/libpthread/nptl/pt-cleanup.c
index 96836a14a..f9d9598e0 100644
--- a/libpthread/nptl/pt-cleanup.c
+++ b/libpthread/nptl/pt-cleanup.c
@@ -60,5 +60,3 @@ __pthread_cleanup_upto (__jmp_buf target, char *targetframe)
THREAD_SETMEM (self, cleanup, cbuf);
}
-hidden_def (__pthread_cleanup_upto)
-
diff --git a/libpthread/nptl/pthreadP.h b/libpthread/nptl/pthreadP.h
index a10444b78..36ce6c696 100644
--- a/libpthread/nptl/pthreadP.h
+++ b/libpthread/nptl/pthreadP.h
@@ -179,22 +179,22 @@ __do_cancel (void)
# define LIBC_CANCEL_RESET(oldtype) \
__libc_disable_asynccancel (oldtype)
# define LIBC_CANCEL_HANDLED() \
- __asm (".globl " __SYMBOL_PREFIX "__libc_enable_asynccancel"); \
- __asm (".globl " __SYMBOL_PREFIX "__libc_disable_asynccancel")
+ __asm (".globl " __C_SYMBOL_PREFIX__ "__libc_enable_asynccancel"); \
+ __asm (".globl " __C_SYMBOL_PREFIX__ "__libc_disable_asynccancel")
#elif defined NOT_IN_libc && defined IS_IN_libpthread
# define LIBC_CANCEL_ASYNC() CANCEL_ASYNC ()
# define LIBC_CANCEL_RESET(val) CANCEL_RESET (val)
# define LIBC_CANCEL_HANDLED() \
- __asm (".globl " __SYMBOL_PREFIX "__pthread_enable_asynccancel"); \
- __asm (".globl " __SYMBOL_PREFIX "__pthread_disable_asynccancel")
+ __asm (".globl " __C_SYMBOL_PREFIX__ "__pthread_enable_asynccancel"); \
+ __asm (".globl " __C_SYMBOL_PREFIX__ "__pthread_disable_asynccancel")
#elif defined NOT_IN_libc && defined IS_IN_librt
# define LIBC_CANCEL_ASYNC() \
__librt_enable_asynccancel ()
# define LIBC_CANCEL_RESET(val) \
__librt_disable_asynccancel (val)
# define LIBC_CANCEL_HANDLED() \
- __asm (".globl " __SYMBOL_PREFIX "__librt_enable_asynccancel"); \
- __asm (".globl " __SYMBOL_PREFIX "__librt_disable_asynccancel")
+ __asm (".globl " __C_SYMBOL_PREFIX__ "__librt_enable_asynccancel"); \
+ __asm (".globl " __C_SYMBOL_PREFIX__ "__librt_disable_asynccancel")
#else
# define LIBC_CANCEL_ASYNC() 0 /* Just a dummy value. */
# define LIBC_CANCEL_RESET(val) ((void)(val)) /* Nothing, but evaluate it. */
diff --git a/libpthread/nptl/sysdeps/generic/dl-tls.c b/libpthread/nptl/sysdeps/generic/dl-tls.c
index d5a25d01b..1a045ba5b 100644
--- a/libpthread/nptl/sysdeps/generic/dl-tls.c
+++ b/libpthread/nptl/sysdeps/generic/dl-tls.c
@@ -302,7 +302,6 @@ _dl_tls_setup (void)
return 0;
}
-rtld_hidden_def (_dl_tls_setup)
# endif
static void *
@@ -473,7 +472,6 @@ _dl_allocate_tls_init (void *result)
return result;
}
-rtld_hidden_def (_dl_allocate_tls_init)
void *
internal_function
@@ -483,7 +481,6 @@ _dl_allocate_tls (void *mem)
? _dl_allocate_tls_storage ()
: allocate_dtv (mem));
}
-rtld_hidden_def (_dl_allocate_tls)
void
@@ -518,7 +515,6 @@ _dl_deallocate_tls (void *tcb, bool dealloc_tcb)
free (tcb);
}
}
-rtld_hidden_def (_dl_deallocate_tls)
# ifdef SHARED
diff --git a/libpthread/nptl/sysdeps/pthread/pthread-functions.h b/libpthread/nptl/sysdeps/pthread/pthread-functions.h
index d75bbbb11..813d55621 100644
--- a/libpthread/nptl/sysdeps/pthread/pthread-functions.h
+++ b/libpthread/nptl/sysdeps/pthread/pthread-functions.h
@@ -72,8 +72,12 @@ struct pthread_functions
int (*ptr_pthread_mutex_destroy) (pthread_mutex_t *);
int (*ptr_pthread_mutex_init) (pthread_mutex_t *,
const pthread_mutexattr_t *);
+ int (*ptr_pthread_mutex_trylock) (pthread_mutex_t *);
int (*ptr_pthread_mutex_lock) (pthread_mutex_t *);
int (*ptr_pthread_mutex_unlock) (pthread_mutex_t *);
+ int (*ptr_pthread_mutexattr_init) (pthread_mutexattr_t *attr);
+ int (*ptr_pthread_mutexattr_destroy) (pthread_mutexattr_t *attr);
+ int (*ptr_pthread_mutexattr_settype) (pthread_mutexattr_t *attr, int kind);
pthread_t (*ptr_pthread_self) (void);
int (*ptr_pthread_setcancelstate) (int, int *);
int (*ptr_pthread_setcanceltype) (int, int *);
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/alpha/vfork.S b/libpthread/nptl/sysdeps/unix/sysv/linux/alpha/vfork.S
index f4ed9311b..f0c39982c 100644
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/alpha/vfork.S
+++ b/libpthread/nptl/sysdeps/unix/sysv/linux/alpha/vfork.S
@@ -42,5 +42,5 @@ PSEUDO (__vfork, vfork, 0)
1: ret
PSEUDO_END (__vfork)
-libc_hidden_def (__vfork)
+hidden_def (__vfork)
weak_alias (__vfork, vfork)
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/fork.c b/libpthread/nptl/sysdeps/unix/sysv/linux/fork.c
index f62e4b919..fd137c752 100644
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/fork.c
+++ b/libpthread/nptl/sysdeps/unix/sysv/linux/fork.c
@@ -67,7 +67,7 @@ fresetlockfiles (void)
pid_t
-__libc_fork_nptl (void)
+__libc_fork (void)
{
pid_t pid;
struct used_handler
@@ -251,3 +251,6 @@ __libc_fork_nptl (void)
return pid;
}
+weak_alias (__libc_fork, __fork)
+hidden_def (__fork)
+weak_alias (__libc_fork, fork)
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 cf5150341..f337816cf 100644
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/libc_pthread_init.c
+++ b/libpthread/nptl/sysdeps/unix/sysv/linux/libc_pthread_init.c
@@ -48,7 +48,7 @@ __libc_pthread_init (ptr, reclaim, functions)
/* 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,
+ __memcpy (&__libc_pthread_functions, functions,
sizeof (__libc_pthread_functions));
#endif
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/mips/Makefile.arch b/libpthread/nptl/sysdeps/unix/sysv/linux/mips/Makefile.arch
index 76d79be29..cef63bfae 100644
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/mips/Makefile.arch
+++ b/libpthread/nptl/sysdeps/unix/sysv/linux/mips/Makefile.arch
@@ -8,10 +8,10 @@
libpthread_SSRC = pt-vfork.S #clone.S
libpthread_CSRC = pthread_once.c
-libc_a_CSRC = fork-nptl.c
+libc_a_CSRC = fork.c
ifeq ($(UCLIBC_HAS_STDIO_FUTEXES),y)
-CFLAGS-fork-nptl.c = -D__USE_STDIO_FUTEXES__
+CFLAGS-fork.c = -D__USE_STDIO_FUTEXES__
endif
CFLAGS-pthread_once.c = -DNOT_IN_libc=1 -DIS_IN_libpthread=1
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S b/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S
index 4b035a61f..61a712e44 100644
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S
+++ b/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S
@@ -53,5 +53,5 @@ ENTRY (__vfork)
PSEUDO_RET
PSEUDO_END (__vfork)
-libc_hidden_def (__vfork)
+hidden_def (__vfork)
weak_alias (__vfork, vfork)
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S b/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S
index 793762270..ca054bce6 100644
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S
+++ b/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S
@@ -51,5 +51,5 @@ ENTRY (__vfork)
PSEUDO_RET
PSEUDO_END (__vfork)
-libc_hidden_def (__vfork)
+hidden_def (__vfork)
weak_alias (__vfork, vfork)
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/pt-fork.c b/libpthread/nptl/sysdeps/unix/sysv/linux/pt-fork.c
index 5315b0564..a1e228ee2 100644
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/pt-fork.c
+++ b/libpthread/nptl/sysdeps/unix/sysv/linux/pt-fork.c
@@ -19,9 +19,10 @@
#include <unistd.h>
+
pid_t
__fork (void)
{
- return __libc_fork_nptl ();
+ return __libc_fork ();
}
strong_alias (__fork, fork)
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/raise.c b/libpthread/nptl/sysdeps/unix/sysv/linux/raise.c
index 29b1cd6b9..0669cab78 100644
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/raise.c
+++ b/libpthread/nptl/sysdeps/unix/sysv/linux/raise.c
@@ -71,5 +71,5 @@ raise (sig)
return INLINE_SYSCALL (tkill, 2, selftid, sig);
#endif
}
-libc_hidden_def (raise)
+hidden_def (raise)
weak_alias (raise, gsignal)
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/register-atfork.c b/libpthread/nptl/sysdeps/unix/sysv/linux/register-atfork.c
index a73f6c421..a3bb3c34c 100644
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/register-atfork.c
+++ b/libpthread/nptl/sysdeps/unix/sysv/linux/register-atfork.c
@@ -106,7 +106,7 @@ __register_atfork (prepare, parent, child, dso_handle)
return newp == NULL ? ENOMEM : 0;
}
-libc_hidden_def (__register_atfork)
+hidden_def (__register_atfork)
#ifndef __UCLIBC__
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/sh/pt-vfork.S b/libpthread/nptl/sysdeps/unix/sysv/linux/sh/pt-vfork.S
index 2d1148daa..54f2281d7 100644
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/sh/pt-vfork.S
+++ b/libpthread/nptl/sysdeps/unix/sysv/linux/sh/pt-vfork.S
@@ -61,6 +61,5 @@ ENTRY (__vfork)
.word PID - TLS_PRE_TCB_SIZE
PSEUDO_END (__vfork)
-libc_hidden_def (__vfork)
weak_alias (__vfork, vfork)
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/sh/vfork.S b/libpthread/nptl/sysdeps/unix/sysv/linux/sh/vfork.S
index 5433eacbe..b5f5d86dd 100644
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/sh/vfork.S
+++ b/libpthread/nptl/sysdeps/unix/sysv/linux/sh/vfork.S
@@ -66,6 +66,6 @@ ENTRY (__vfork)
.word PID - TLS_PRE_TCB_SIZE
.align 2
PSEUDO_END (__vfork)
-libc_hidden_def (__vfork)
+hidden_def (__vfork)
weak_alias (__vfork, vfork)
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S b/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S
index 722960814..d804f0c4b 100644
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S
+++ b/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S
@@ -42,5 +42,5 @@ ENTRY(__vfork)
nop
PSEUDO_END (__vfork)
-libc_hidden_def (__vfork)
+hidden_def (__vfork)
weak_alias (__vfork, vfork)
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S b/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S
index d6b2455d4..8de9863e7 100644
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S
+++ b/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S
@@ -42,5 +42,5 @@ ENTRY(__vfork)
nop
PSEUDO_END (__vfork)
-libc_hidden_def (__vfork)
+hidden_def (__vfork)
weak_alias (__vfork, vfork)
diff --git a/libpthread/nptl/unwind.c b/libpthread/nptl/unwind.c
index 56a423815..cf8d9e506 100644
--- a/libpthread/nptl/unwind.c
+++ b/libpthread/nptl/unwind.c
@@ -162,7 +162,6 @@ __pthread_unwind (__pthread_unwind_buf_t *buf)
/* We better do not get here. */
abort ();
}
-hidden_def (__pthread_unwind)
void
@@ -173,4 +172,3 @@ __pthread_unwind_next (__pthread_unwind_buf_t *buf)
__pthread_unwind ((__pthread_unwind_buf_t *) ibuf->priv.data.prev);
}
-hidden_def (__pthread_unwind_next)