From bddde5860ffb8a78587854cc8e3e914bd69269ca Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Sun, 22 Jan 2017 10:24:51 +0100 Subject: remove PID caching Follow GNU C Library from c579f48edba88380635ab98cb612030e3ed8691e and remove the PID caching. These simplifies the architecture specific assembly code. The run of the test suite found no regressions, it even solves some of the test failures for x86/x86_64/sparc. Reviewed-by: Max Filippov Reviewed-by: Vineet Gupta Acked-by: Matthew Fortune Acked-by: Alexey Brodkin --- .../sysdeps/unix/sysv/linux/x86_64/Makefile.arch | 6 ++-- .../nptl/sysdeps/unix/sysv/linux/x86_64/clone.S | 3 -- .../nptl/sysdeps/unix/sysv/linux/x86_64/vfork.S | 42 ---------------------- 3 files changed, 2 insertions(+), 49 deletions(-) delete mode 100644 libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/clone.S delete mode 100644 libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/vfork.S (limited to 'libpthread/nptl/sysdeps/unix/sysv/linux/x86_64') diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/Makefile.arch b/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/Makefile.arch index b48f4cb0b..f3883dbe0 100644 --- a/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/Makefile.arch +++ b/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/Makefile.arch @@ -5,7 +5,7 @@ # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. # -libpthread_linux_arch_SSRC = clone.S pthread_once.S \ +libpthread_linux_arch_SSRC = pthread_once.S \ lowlevellock.S pthread_barrier_wait.S pthread_cond_signal.S pthread_cond_broadcast.S \ sem_post.S sem_timedwait.S lowlevelrobustlock.S \ sem_trywait.S sem_wait.S pthread_rwlock_rdlock.S pthread_rwlock_wrlock.S \ @@ -14,9 +14,7 @@ libpthread_linux_arch_SSRC = clone.S pthread_once.S \ libpthread_linux_arch_CSRC = pthread_spin_init.c libc_linux_arch_CSRC = fork.c -libc_linux_arch_SSRC = clone.S vfork.S libc-cancellation.S libc-lowlevellock.S -libc_linux_arch_SSRC-OMIT = waitpid.S +libc_linux_arch_SSRC = libc-cancellation.S libc-lowlevellock.S librt_linux_arch_SSRC = librt-cancellation.S ASFLAGS += -DUSE___THREAD - diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/clone.S b/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/clone.S deleted file mode 100644 index efbaee3d1..000000000 --- a/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/clone.S +++ /dev/null @@ -1,3 +0,0 @@ -#include -#define RESET_PID -#include diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/vfork.S b/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/vfork.S deleted file mode 100644 index f3280b8cc..000000000 --- a/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/vfork.S +++ /dev/null @@ -1,42 +0,0 @@ -/* Copyright (C) 2004 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - 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 - . */ - -/* We want an #include_next, but we are the main source file. - So, #include ourselves and in that incarnation we can use #include_next. */ -#ifndef INCLUDED_SELF -# define INCLUDED_SELF -# include -#else - -# include - -# define SAVE_PID \ - movl %fs:PID, %esi; \ - movl $0x80000000, %ecx; \ - movl %esi, %edx; \ - negl %edx; \ - cmove %ecx, %edx; \ - movl %edx, %fs:PID - -# define RESTORE_PID \ - testq %rax, %rax; \ - je 1f; \ - movl %esi, %fs:PID; \ -1: - -# include_next -#endif -- cgit v1.2.3