summaryrefslogtreecommitdiff
path: root/libpthread/nptl
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@uclibc-ng.org>2016-10-09 10:08:08 +0200
committerWaldemar Brodkorb <wbx@uclibc-ng.org>2016-10-13 21:18:32 +0200
commita3e5bfd20712f71790ea9bae9e9be250f07e8c21 (patch)
tree21550ca2df8a7573185cf4274c1b925e1e8de493 /libpthread/nptl
parent48442540e4c481474c4493192cbd9cb58c5016ad (diff)
cleanup and fix static linking issues
There was a deadlock hanging in a sycall to futex, which should be solved now. Signed-off-by: Waldemar Brodkorb <wbx@uclibc-ng.org>
Diffstat (limited to 'libpthread/nptl')
-rw-r--r--libpthread/nptl/sysdeps/pthread/Makefile.in1
-rw-r--r--libpthread/nptl/sysdeps/pthread/pt-longjmp.c30
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/Makefile.commonarch2
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/jmp-unwind.c1
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/libc-lowlevellock.c20
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/lowlevellock.c3
6 files changed, 2 insertions, 55 deletions
diff --git a/libpthread/nptl/sysdeps/pthread/Makefile.in b/libpthread/nptl/sysdeps/pthread/Makefile.in
index a501b6403..6c09e7b7e 100644
--- a/libpthread/nptl/sysdeps/pthread/Makefile.in
+++ b/libpthread/nptl/sysdeps/pthread/Makefile.in
@@ -32,7 +32,6 @@ libpthread_pthread_CSRC = \
pthread_spin_destroy.c \
pthread_spin_init.c \
pthread_spin_unlock.c \
- pt-longjmp.c \
pt-sigaction.c \
tpp.c
diff --git a/libpthread/nptl/sysdeps/pthread/pt-longjmp.c b/libpthread/nptl/sysdeps/pthread/pt-longjmp.c
deleted file mode 100644
index 9fcea0478..000000000
--- a/libpthread/nptl/sysdeps/pthread/pt-longjmp.c
+++ /dev/null
@@ -1,30 +0,0 @@
-/* Copyright (C) 2002, 2003 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, see
- <http://www.gnu.org/licenses/>. */
-
-#include <setjmp.h>
-#include <stdlib.h>
-#include "pthreadP.h"
-
-extern __typeof(longjmp) __libc_longjmp attribute_noreturn;
-
-void
-longjmp (jmp_buf env, int val)
-{
- __libc_longjmp (env, val);
-}
-weak_alias (longjmp, siglongjmp)
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/Makefile.commonarch b/libpthread/nptl/sysdeps/unix/sysv/linux/Makefile.commonarch
index 649d188e6..a438e9739 100644
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/Makefile.commonarch
+++ b/libpthread/nptl/sysdeps/unix/sysv/linux/Makefile.commonarch
@@ -69,7 +69,7 @@ libpthread_linux_SSRC := #ptw-close.S ptw-open.S ptw-waitid.S ptw-waidpid.S ptw-
libc_linux_CSRC += libc_pthread_init.c libc_multiple_threads.c \
register-atfork.c unregister-atfork.c getpid.c \
- raise.c jmp-unwind.c libc-lowlevellock.c
+ raise.c jmp-unwind.c
librt_linux_CSRC += mq_notify.c timer_create.c timer_delete.c \
timer_getoverr.c timer_gettime.c timer_routines.c \
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/jmp-unwind.c b/libpthread/nptl/sysdeps/unix/sysv/linux/jmp-unwind.c
index 6013ab040..965327c50 100644
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/jmp-unwind.c
+++ b/libpthread/nptl/sysdeps/unix/sysv/linux/jmp-unwind.c
@@ -27,6 +27,7 @@ extern void __pthread_cleanup_upto (__jmp_buf env, char *targetframe);
void
_longjmp_unwind (jmp_buf env, int val)
{
+ if (__pthread_cleanup_upto != NULL)
__pthread_cleanup_upto (env->__jmpbuf, CURRENT_STACK_FRAME);
}
libc_hidden_def(_longjmp_unwind)
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/libc-lowlevellock.c b/libpthread/nptl/sysdeps/unix/sysv/linux/libc-lowlevellock.c
deleted file mode 100644
index 28672a65f..000000000
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/libc-lowlevellock.c
+++ /dev/null
@@ -1,20 +0,0 @@
-/* Copyright (C) 2003 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Paul Mackerras <paulus@au.ibm.com>, 2003.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, see
- <http://www.gnu.org/licenses/>. */
-
-/* No difference to lowlevellock.c, except we lose a couple of functions. */
-#include "lowlevellock.c"
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/lowlevellock.c b/libpthread/nptl/sysdeps/unix/sysv/linux/lowlevellock.c
index 75369bd70..4294a20b0 100644
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/lowlevellock.c
+++ b/libpthread/nptl/sysdeps/unix/sysv/linux/lowlevellock.c
@@ -24,9 +24,6 @@
#include <tls.h>
void
-#ifndef IS_IN_libpthread
-weak_function
-#endif
__lll_lock_wait_private (int *futex)
{
if (*futex == 2)