aboutsummaryrefslogtreecommitdiff
path: root/nptl/sysdeps
diff options
context:
space:
mode:
Diffstat (limited to 'nptl/sysdeps')
-rw-r--r--nptl/sysdeps/pthread/bits/libc-lock.h9
-rw-r--r--nptl/sysdeps/unix/sysv/linux/i386/pthread_once.S3
-rw-r--r--nptl/sysdeps/unix/sysv/linux/pthread_kill.c3
3 files changed, 10 insertions, 5 deletions
diff --git a/nptl/sysdeps/pthread/bits/libc-lock.h b/nptl/sysdeps/pthread/bits/libc-lock.h
index 30e3410..cb21549 100644
--- a/nptl/sysdeps/pthread/bits/libc-lock.h
+++ b/nptl/sysdeps/pthread/bits/libc-lock.h
@@ -1,4 +1,4 @@
-/* libc-internal interface for mutex locks. LinuxThreads version.
+/* libc-internal interface for mutex locks. NPTL version.
Copyright (C) 1996-2001, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -254,8 +254,8 @@ typedef pthread_key_t __libc_key_t;
/* Try to lock the recursive named lock variable. */
#if defined _LIBC && (!defined NOT_IN_libc || defined IS_IN_libpthread)
-# define __libc_lock_trylock_recursive(NAME) \
- do { \
+# define __libc_lock_trylock_recursive(NAME) \
+ ({ \
int result = 0; \
void *self = THREAD_SELF; \
if ((NAME).owner != self) \
@@ -270,7 +270,8 @@ typedef pthread_key_t __libc_key_t;
} \
else \
++(NAME).cnt; \
- } while (0)
+ result; \
+ })
#else
# define __libc_lock_trylock_recursive(NAME) \
__libc_maybe_call (__pthread_mutex_trylock, (&(NAME)), 0)
diff --git a/nptl/sysdeps/unix/sysv/linux/i386/pthread_once.S b/nptl/sysdeps/unix/sysv/linux/i386/pthread_once.S
index 747c8ec..931e38b 100644
--- a/nptl/sysdeps/unix/sysv/linux/i386/pthread_once.S
+++ b/nptl/sysdeps/unix/sysv/linux/i386/pthread_once.S
@@ -134,6 +134,9 @@ __pthread_once:
.size __pthread_once,.-__pthread_once
+ .globl __pthread_once_internal
+__pthread_once_internal = __pthread_once
+
.globl pthread_once
pthread_once = __pthread_once
diff --git a/nptl/sysdeps/unix/sysv/linux/pthread_kill.c b/nptl/sysdeps/unix/sysv/linux/pthread_kill.c
index f5c2377..2c31dd6 100644
--- a/nptl/sysdeps/unix/sysv/linux/pthread_kill.c
+++ b/nptl/sysdeps/unix/sysv/linux/pthread_kill.c
@@ -25,7 +25,7 @@
int
-pthread_kill (threadid, signo)
+__pthread_kill (threadid, signo)
pthread_t threadid;
int signo;
{
@@ -34,3 +34,4 @@ pthread_kill (threadid, signo)
/* We have a special syscall to do the work. */
return INLINE_SYSCALL (tkill, 2, pd->tid, signo);
}
+strong_alias (__pthread_kill, pthread_kill)