From a3e5bfd20712f71790ea9bae9e9be250f07e8c21 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Sun, 9 Oct 2016 10:08:08 +0200 Subject: 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 --- .../nptl/sysdeps/unix/sysv/linux/Makefile.commonarch | 2 +- libpthread/nptl/sysdeps/unix/sysv/linux/jmp-unwind.c | 1 + .../nptl/sysdeps/unix/sysv/linux/libc-lowlevellock.c | 20 -------------------- .../nptl/sysdeps/unix/sysv/linux/lowlevellock.c | 3 --- 4 files changed, 2 insertions(+), 24 deletions(-) delete mode 100644 libpthread/nptl/sysdeps/unix/sysv/linux/libc-lowlevellock.c (limited to 'libpthread/nptl/sysdeps/unix/sysv/linux') 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 , 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 - . */ - -/* 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 void -#ifndef IS_IN_libpthread -weak_function -#endif __lll_lock_wait_private (int *futex) { if (*futex == 2) -- cgit v1.2.3