From patchwork Thu Nov 14 14:46:58 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella Netto X-Patchwork-Id: 1194865 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=libc-alpha-return-107080-incoming=patchwork.ozlabs.org@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.b="S2OiuCNd"; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="tsgsDQ+r"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 47DPTN60h2z9s7T for ; Fri, 15 Nov 2019 01:47:20 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:date:message-id; q=dns; s= default; b=oUT3NRijROftEtLnotGZjt1OHXHk5bOT7eij7tMiwhdB9JygbJHS9 eudqBsurExP25H2ys2UxK1nFsvfB49LbCbkEZuGMmU4t8ZP7pKfljwusbG64Odn0 wsF6dhVwCzXpAtoiN49J2McYZQ/i0gp1jtmEvZ8cWVGRE36gilS0Zo= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:date:message-id; s=default; bh=4fZsRYJVBBZO+eH7Qfvd+Tdf9Mo=; b=S2OiuCNd0zewF9ippmnjYIeFVboA HdtWBrebLrSWc8vh+Fr0+rGiZzEoeQ0iVsF9fjd1Dkwzxy+5g/MkVYF/IRPbOOm7 qIAxRPtY8cg/J/sL6XzBaNp1hl6PNjLPUsyXPcbd3wYzEOGZ7ofYujeP/cEGyv/D p9Q7S5sCCelvLxk= Received: (qmail 28842 invoked by alias); 14 Nov 2019 14:47:14 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 28834 invoked by uid 89); 14 Nov 2019 14:47:13 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-21.6 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_SHORT, SPF_PASS autolearn=ham version=3.3.1 spammy=sk:INTERNA X-HELO: mail-qv1-f67.google.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=s67mveFj3RgNUr+tNCaJCoDmwPM9abKG9Xh9e8y8Tzo=; b=tsgsDQ+rEXk6Bx8D4aYgQAmRBcmOZXdyxYfKWkcdfEyZKlWPNeO0Z6oXBXTgstkCnN G0jvqr9XX0MRPKaHbWYeqtyBh7njhS9y0HsWjxZAINKcx+u8E4UYWrl3DrrHkk5kdqHS BzgdvYd4+yVD9GwAKYqHZOzp/Mge61lBNgVO5JcaL4r0I0eMPhAZ+8Tc257AzsYWkWmz njBc1xtgw/ShysDqsuJgT9EZEhQ77HTB3ySFgvlqqiG1EKGzdWTvftAF5ZVUtzpBmCpr XG6YtaPKwxSxPoWyzaeb7nCF8/CD+hYP9ov15lkNEpb4gyflKLLmRFaxASGy9M65hYtt OBVA== From: Adhemerval Zanella To: libc-alpha@sourceware.org Cc: Alistair Francis , alistair23@gmail.com Subject: [PATCH 1/7] Remove __waitpid_nocancel Date: Thu, 14 Nov 2019 11:46:58 -0300 Message-Id: <20191114144704.19002-1-adhemerval.zanella@linaro.org> It enables and disable cancellation with pthread_setcancelstate prior calling the waitpid. It simplifies the waitpid implementation for architectures that does not provide either __NR_waitpid or __NR_wait4. Checked on x86_64-linux-gnu. --- libio/iopopen.c | 6 +++- sysdeps/generic/not-cancel.h | 2 -- sysdeps/posix/system.c | 6 +++- sysdeps/unix/sysv/linux/Makefile | 2 +- sysdeps/unix/sysv/linux/not-cancel.h | 4 --- sysdeps/unix/sysv/linux/waitpid_nocancel.c | 34 ---------------------- 6 files changed, 11 insertions(+), 43 deletions(-) delete mode 100644 sysdeps/unix/sysv/linux/waitpid_nocancel.c diff --git a/libio/iopopen.c b/libio/iopopen.c index 22d53a88ef..a15d3bf4b6 100644 --- a/libio/iopopen.c +++ b/libio/iopopen.c @@ -281,7 +281,11 @@ _IO_new_proc_close (FILE *fp) described in POSIX.2, such implementations are not conforming." */ do { - wait_pid = __waitpid_nocancel (((_IO_proc_file *) fp)->pid, &wstatus, 0); + int state; + __libc_ptf_call (__pthread_setcancelstate, + (PTHREAD_CANCEL_DISABLE, &state), 0); + wait_pid = __waitpid (((_IO_proc_file *) fp)->pid, &wstatus, 0); + __libc_ptf_call (__pthread_setcancelstate, (state, NULL), 0); } while (wait_pid == -1 && errno == EINTR); if (wait_pid == -1) diff --git a/sysdeps/generic/not-cancel.h b/sysdeps/generic/not-cancel.h index d3b53e48cf..e0729bb1db 100644 --- a/sysdeps/generic/not-cancel.h +++ b/sysdeps/generic/not-cancel.h @@ -47,8 +47,6 @@ __write (fd, buf, n) #define __writev_nocancel_nostatus(fd, iov, n) \ (void) __writev (fd, iov, n) -# define __waitpid_nocancel(pid, stat_loc, options) \ - __waitpid (pid, stat_loc, options) #define __fcntl64_nocancel(fd, cmd, ...) \ __fcntl64 (fd, cmd, __VA_ARGS__) diff --git a/sysdeps/posix/system.c b/sysdeps/posix/system.c index d8c6cb8e1c..6de85bd3e4 100644 --- a/sysdeps/posix/system.c +++ b/sysdeps/posix/system.c @@ -81,7 +81,11 @@ cancel_handler (void *arg) __kill_noerrno (args->pid, SIGKILL); - TEMP_FAILURE_RETRY (__waitpid_nocancel (args->pid, NULL, 0)); + int state; + __libc_ptf_call (__pthread_setcancelstate, + (PTHREAD_CANCEL_DISABLE, &state), 0); + TEMP_FAILURE_RETRY (__waitpid (args->pid, NULL, 0)); + __libc_ptf_call (__pthread_setcancelstate, (state, NULL), 0); DO_LOCK (); if (SUB_REF () == 0) diff --git a/sysdeps/unix/sysv/linux/Makefile b/sysdeps/unix/sysv/linux/Makefile index 07776d28ea..8735092c12 100644 --- a/sysdeps/unix/sysv/linux/Makefile +++ b/sysdeps/unix/sysv/linux/Makefile @@ -216,7 +216,7 @@ sysdep_routines += xstatconv internal_statvfs internal_statvfs64 \ open_nocancel open64_nocancel \ openat_nocancel openat64_nocancel \ read_nocancel pread64_nocancel \ - waitpid_nocancel write_nocancel statx_cp + write_nocancel statx_cp sysdep_headers += bits/fcntl-linux.h diff --git a/sysdeps/unix/sysv/linux/not-cancel.h b/sysdeps/unix/sysv/linux/not-cancel.h index 192a0a5195..49e4e0249a 100644 --- a/sysdeps/unix/sysv/linux/not-cancel.h +++ b/sysdeps/unix/sysv/linux/not-cancel.h @@ -69,9 +69,6 @@ __writev_nocancel_nostatus (int fd, const struct iovec *iov, int iovcnt) INTERNAL_SYSCALL_CALL (writev, err, fd, iov, iovcnt); } -/* Uncancelable waitpid. */ -__typeof (waitpid) __waitpid_nocancel; - /* Uncancelable fcntl. */ __typeof (__fcntl) __fcntl64_nocancel; @@ -84,7 +81,6 @@ hidden_proto (__read_nocancel) hidden_proto (__pread64_nocancel) hidden_proto (__write_nocancel) hidden_proto (__close_nocancel) -hidden_proto (__waitpid_nocancel) hidden_proto (__fcntl64_nocancel) #endif diff --git a/sysdeps/unix/sysv/linux/waitpid_nocancel.c b/sysdeps/unix/sysv/linux/waitpid_nocancel.c deleted file mode 100644 index 3697c6b938..0000000000 --- a/sysdeps/unix/sysv/linux/waitpid_nocancel.c +++ /dev/null @@ -1,34 +0,0 @@ -/* Linux waitpid syscall implementation -- non-cancellable. - Copyright (C) 2018-2019 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 - . */ - -#include -#include -#include -#include -#include - -__pid_t -__waitpid_nocancel (__pid_t pid, int *stat_loc, int options) -{ -#ifdef __NR_waitpid - return INLINE_SYSCALL_CALL (waitpid, pid, stat_loc, options); -#else - return INLINE_SYSCALL_CALL (wait4, pid, stat_loc, options, NULL); -#endif -} -libc_hidden_def (__waitpid_nocancel) From patchwork Thu Nov 14 14:46:59 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella Netto X-Patchwork-Id: 1194866 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=libc-alpha-return-107081-incoming=patchwork.ozlabs.org@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.b="RIPxHzfw"; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="w8bIpQ7i"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 47DPTZ4mTXz9s7T for ; Fri, 15 Nov 2019 01:47:30 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:date:message-id:in-reply-to :references; q=dns; s=default; b=DnaJ+f1EFK604jLSWuA3eMnLnSdxR9Z MSA1b3NZkqfsi2mJtrqYodJ5Zh6sFVu+RLWPiZxX8oXTjJYIfJEJNi1YU085PABA WTtFCdv0euBrji1TzzL4cEFNBF/2O3T4ewyzgCozqZ3DArFq9YBWOYWgQ0lToc5m /c/jeJbx7NZo= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:date:message-id:in-reply-to :references; s=default; bh=T+lIeuh0WhDpHS9osxdwpp3mty0=; b=RIPxH zfwS7946s1Ns6AvUF9SCCrLfd6ovLyQ8CspqTg2tXHDRZSFPnov53EzoTYWl4HA5 Xh4kGzKGrAoS3YRVc7q6vGOOlmcs4m76pK0FrStGRaTL+Okj8/f8LLe1IsOLEkhH nDGgMei1s33PqmsevxxSABKrbrGkYEuDuoOYoM= Received: (qmail 29466 invoked by alias); 14 Nov 2019 14:47:19 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 29362 invoked by uid 89); 14 Nov 2019 14:47:18 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-21.6 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, SPF_PASS autolearn=ham version=3.3.1 spammy=2026 X-HELO: mail-qv1-f65.google.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=2evQdZsreVYIwA1br+qfyJvuN/LxkUfIkRT3x+x1u8s=; b=w8bIpQ7ivT+ckrdADuz2FrL52xBLvDWm4RbguvcKTYJ4eF5wXm6CVp+INEl7VwguBs 3Jzo+88g/Qrz3/bGqbR5cG8D6fW0EgEt+s62bwINVI7tNL6EiClX4HM1EybpnFmFTY/e ngDNW6XM26fVJDXpUEKIcMVBm1pZgRQh2SVlzEpfIbpfHHCwi07if5Yo5uoYUnWvlyad inEcZelWWK2cpQxKcepB0ucktLVd9M74Hhw3ckfXGf/MhSCrinlxuKlnuZC63uCNWlqw j2QFokyUeI6vSGHDCuwFgGcwyhbfPQXEbrv7gzcaAFqShiylesfwoXH15q/x+DwmLSHW YVKg== From: Adhemerval Zanella To: libc-alpha@sourceware.org Cc: Alistair Francis , alistair23@gmail.com Subject: [PATCH 2/7] nptl: Move wait implementation to libc Date: Thu, 14 Nov 2019 11:46:59 -0300 Message-Id: <20191114144704.19002-2-adhemerval.zanella@linaro.org> In-Reply-To: <20191114144704.19002-1-adhemerval.zanella@linaro.org> References: <20191114144704.19002-1-adhemerval.zanella@linaro.org> Checked on x86_64-linux-gnu and powerpc64le-linux-gnu. --- nptl/Makefile | 3 +-- nptl/Versions | 2 +- nptl/libpthread-compat.c | 16 ++++++++++++++-- .../unix/sysv/linux/aarch64/libpthread.abilist | 2 -- sysdeps/unix/sysv/linux/alpha/libpthread.abilist | 2 -- .../unix/sysv/linux/arm/be/libpthread.abilist | 2 -- .../unix/sysv/linux/arm/le/libpthread.abilist | 2 -- sysdeps/unix/sysv/linux/csky/libpthread.abilist | 2 -- sysdeps/unix/sysv/linux/hppa/libpthread.abilist | 3 --- sysdeps/unix/sysv/linux/i386/libpthread.abilist | 2 -- sysdeps/unix/sysv/linux/ia64/libpthread.abilist | 3 --- .../sysv/linux/m68k/coldfire/libpthread.abilist | 2 -- .../sysv/linux/m68k/m680x0/libpthread.abilist | 2 -- .../sysv/linux/microblaze/be/libpthread.abilist | 2 -- .../sysv/linux/microblaze/le/libpthread.abilist | 2 -- .../sysv/linux/mips/mips32/libpthread.abilist | 3 --- .../sysv/linux/mips/mips64/libpthread.abilist | 3 --- sysdeps/unix/sysv/linux/nios2/libpthread.abilist | 2 -- .../linux/powerpc/powerpc32/libpthread.abilist | 2 -- .../powerpc/powerpc64/be/libpthread.abilist | 2 -- .../powerpc/powerpc64/le/libpthread.abilist | 2 -- .../sysv/linux/riscv/rv64/libpthread.abilist | 2 -- .../sysv/linux/s390/s390-32/libpthread.abilist | 2 -- .../sysv/linux/s390/s390-64/libpthread.abilist | 3 --- sysdeps/unix/sysv/linux/sh/be/libpthread.abilist | 3 --- sysdeps/unix/sysv/linux/sh/le/libpthread.abilist | 3 --- .../sysv/linux/sparc/sparc32/libpthread.abilist | 2 -- .../sysv/linux/sparc/sparc64/libpthread.abilist | 3 --- .../unix/sysv/linux/x86_64/64/libpthread.abilist | 3 --- .../sysv/linux/x86_64/x32/libpthread.abilist | 2 -- 30 files changed, 16 insertions(+), 68 deletions(-) diff --git a/nptl/Makefile b/nptl/Makefile index f9aadfd644..f93d41176f 100644 --- a/nptl/Makefile +++ b/nptl/Makefile @@ -46,7 +46,7 @@ pthread-compat-wrappers = \ sendto fsync lseek lseek64 \ msync open open64 pause \ pread pread64 pwrite pwrite64 \ - tcdrain wait waitpid msgrcv msgsnd \ + tcdrain waitpid msgrcv msgsnd \ sigwait sigsuspend \ recvmsg sendmsg @@ -205,7 +205,6 @@ CFLAGS-pread.c += -fexceptions -fasynchronous-unwind-tables CFLAGS-pread64.c += -fexceptions -fasynchronous-unwind-tables CFLAGS-pwrite.c += -fexceptions -fasynchronous-unwind-tables CFLAGS-pwrite64.c += -fexceptions -fasynchronous-unwind-tables -CFLAGS-wait.c += -fexceptions -fasynchronous-unwind-tables CFLAGS-waitpid.c += -fexceptions -fasynchronous-unwind-tables CFLAGS-sigwait.c += -fexceptions -fasynchronous-unwind-tables CFLAGS-msgrcv.c += -fexceptions -fasynchronous-unwind-tables diff --git a/nptl/Versions b/nptl/Versions index 5d6aedb7de..1dda4b9064 100644 --- a/nptl/Versions +++ b/nptl/Versions @@ -99,7 +99,7 @@ libpthread { close; __close; fcntl; __fcntl; read; __read; write; __write; accept; connect; __connect; recv; recvfrom; recvmsg; send; __send; sendmsg; sendto; fsync; lseek; __lseek; msync; open; __open; pause; tcdrain; - system; wait; __wait; waitpid; + system; waitpid; # Hidden entry point (through macros). _pthread_cleanup_push; _pthread_cleanup_pop; diff --git a/nptl/libpthread-compat.c b/nptl/libpthread-compat.c index 7398f5e92d..e11505abfa 100644 --- a/nptl/libpthread-compat.c +++ b/nptl/libpthread-compat.c @@ -26,12 +26,24 @@ version or later, the placeholder symbol is not needed because there are plenty of other symbols which populate those later versions. */ -#if (SHLIB_COMPAT (libpthread, GLIBC_2_1_2, GLIBC_2_2_6)) +#if (SHLIB_COMPAT (libpthread, GLIBC_2_0, GLIBC_2_1_2) \ + || SHLIB_COMPAT (libpthread, GLIBC_2_1_2, GLIBC_2_2)) void attribute_compat_text_section __libpthread_version_placeholder (void) { } -compat_symbol (libpthread, __libpthread_version_placeholder, +#endif + +#if (SHLIB_COMPAT (libpthread, GLIBC_2_0, GLIBC_2_1_2)) +strong_alias (__libpthread_version_placeholder, + __libpthread_version_placeholder_20) +compat_symbol (libpthread, __libpthread_version_placeholder_20, + __libpthread_version_placeholder, GLIBC_2_0); +#endif +#if (SHLIB_COMPAT (libpthread, GLIBC_2_1_2, GLIBC_2_2)) +strong_alias (__libpthread_version_placeholder, + __libpthread_version_placeholder_212) +compat_symbol (libpthread, __libpthread_version_placeholder_212, __libpthread_version_placeholder, GLIBC_2_1_2); #endif diff --git a/sysdeps/unix/sysv/linux/aarch64/libpthread.abilist b/sysdeps/unix/sysv/linux/aarch64/libpthread.abilist index 98a8473fcd..cfa71ef697 100644 --- a/sysdeps/unix/sysv/linux/aarch64/libpthread.abilist +++ b/sysdeps/unix/sysv/linux/aarch64/libpthread.abilist @@ -44,7 +44,6 @@ GLIBC_2.17 __read F GLIBC_2.17 __res_state F GLIBC_2.17 __send F GLIBC_2.17 __sigaction F -GLIBC_2.17 __wait F GLIBC_2.17 __write F GLIBC_2.17 _pthread_cleanup_pop F GLIBC_2.17 _pthread_cleanup_pop_restore F @@ -203,7 +202,6 @@ GLIBC_2.17 siglongjmp F GLIBC_2.17 sigwait F GLIBC_2.17 system F GLIBC_2.17 tcdrain F -GLIBC_2.17 wait F GLIBC_2.17 waitpid F GLIBC_2.17 write F GLIBC_2.18 pthread_getattr_default_np F diff --git a/sysdeps/unix/sysv/linux/alpha/libpthread.abilist b/sysdeps/unix/sysv/linux/alpha/libpthread.abilist index f42bcffd1e..ddb500a9d7 100644 --- a/sysdeps/unix/sysv/linux/alpha/libpthread.abilist +++ b/sysdeps/unix/sysv/linux/alpha/libpthread.abilist @@ -24,7 +24,6 @@ GLIBC_2.0 __pthread_setspecific F GLIBC_2.0 __read F GLIBC_2.0 __send F GLIBC_2.0 __sigaction F -GLIBC_2.0 __wait F GLIBC_2.0 __write F GLIBC_2.0 _pthread_cleanup_pop F GLIBC_2.0 _pthread_cleanup_pop_restore F @@ -103,7 +102,6 @@ GLIBC_2.0 siglongjmp F GLIBC_2.0 sigwait F GLIBC_2.0 system F GLIBC_2.0 tcdrain F -GLIBC_2.0 wait F GLIBC_2.0 waitpid F GLIBC_2.0 write F GLIBC_2.1 __libc_allocate_rtsig F diff --git a/sysdeps/unix/sysv/linux/arm/be/libpthread.abilist b/sysdeps/unix/sysv/linux/arm/be/libpthread.abilist index c5b7aeb7c4..428aac48e6 100644 --- a/sysdeps/unix/sysv/linux/arm/be/libpthread.abilist +++ b/sysdeps/unix/sysv/linux/arm/be/libpthread.abilist @@ -79,7 +79,6 @@ GLIBC_2.4 __read F GLIBC_2.4 __res_state F GLIBC_2.4 __send F GLIBC_2.4 __sigaction F -GLIBC_2.4 __wait F GLIBC_2.4 __write F GLIBC_2.4 _pthread_cleanup_pop F GLIBC_2.4 _pthread_cleanup_pop_restore F @@ -232,6 +231,5 @@ GLIBC_2.4 siglongjmp F GLIBC_2.4 sigwait F GLIBC_2.4 system F GLIBC_2.4 tcdrain F -GLIBC_2.4 wait F GLIBC_2.4 waitpid F GLIBC_2.4 write F diff --git a/sysdeps/unix/sysv/linux/arm/le/libpthread.abilist b/sysdeps/unix/sysv/linux/arm/le/libpthread.abilist index c5b7aeb7c4..428aac48e6 100644 --- a/sysdeps/unix/sysv/linux/arm/le/libpthread.abilist +++ b/sysdeps/unix/sysv/linux/arm/le/libpthread.abilist @@ -79,7 +79,6 @@ GLIBC_2.4 __read F GLIBC_2.4 __res_state F GLIBC_2.4 __send F GLIBC_2.4 __sigaction F -GLIBC_2.4 __wait F GLIBC_2.4 __write F GLIBC_2.4 _pthread_cleanup_pop F GLIBC_2.4 _pthread_cleanup_pop_restore F @@ -232,6 +231,5 @@ GLIBC_2.4 siglongjmp F GLIBC_2.4 sigwait F GLIBC_2.4 system F GLIBC_2.4 tcdrain F -GLIBC_2.4 wait F GLIBC_2.4 waitpid F GLIBC_2.4 write F diff --git a/sysdeps/unix/sysv/linux/csky/libpthread.abilist b/sysdeps/unix/sysv/linux/csky/libpthread.abilist index edbdea39cf..7c17230afd 100644 --- a/sysdeps/unix/sysv/linux/csky/libpthread.abilist +++ b/sysdeps/unix/sysv/linux/csky/libpthread.abilist @@ -42,7 +42,6 @@ GLIBC_2.29 __read F GLIBC_2.29 __res_state F GLIBC_2.29 __send F GLIBC_2.29 __sigaction F -GLIBC_2.29 __wait F GLIBC_2.29 __write F GLIBC_2.29 _pthread_cleanup_pop F GLIBC_2.29 _pthread_cleanup_pop_restore F @@ -219,7 +218,6 @@ GLIBC_2.29 tss_create F GLIBC_2.29 tss_delete F GLIBC_2.29 tss_get F GLIBC_2.29 tss_set F -GLIBC_2.29 wait F GLIBC_2.29 waitpid F GLIBC_2.29 write F GLIBC_2.30 pthread_cond_clockwait F diff --git a/sysdeps/unix/sysv/linux/hppa/libpthread.abilist b/sysdeps/unix/sysv/linux/hppa/libpthread.abilist index d87fadf3d8..9b7c7dae3f 100644 --- a/sysdeps/unix/sysv/linux/hppa/libpthread.abilist +++ b/sysdeps/unix/sysv/linux/hppa/libpthread.abilist @@ -18,7 +18,6 @@ GLIBC_2.2 __h_errno_location F GLIBC_2.2 __libc_allocate_rtsig F GLIBC_2.2 __libc_current_sigrtmax F GLIBC_2.2 __libc_current_sigrtmin F -GLIBC_2.2 __libpthread_version_placeholder F GLIBC_2.2 __lseek F GLIBC_2.2 __open F GLIBC_2.2 __open64 F @@ -47,7 +46,6 @@ GLIBC_2.2 __read F GLIBC_2.2 __res_state F GLIBC_2.2 __send F GLIBC_2.2 __sigaction F -GLIBC_2.2 __wait F GLIBC_2.2 __write F GLIBC_2.2 _pthread_cleanup_pop F GLIBC_2.2 _pthread_cleanup_pop_restore F @@ -181,7 +179,6 @@ GLIBC_2.2 siglongjmp F GLIBC_2.2 sigwait F GLIBC_2.2 system F GLIBC_2.2 tcdrain F -GLIBC_2.2 wait F GLIBC_2.2 waitpid F GLIBC_2.2 write F GLIBC_2.2.3 pthread_getattr_np F diff --git a/sysdeps/unix/sysv/linux/i386/libpthread.abilist b/sysdeps/unix/sysv/linux/i386/libpthread.abilist index 5d1bf0f5ab..a35cbdb0e4 100644 --- a/sysdeps/unix/sysv/linux/i386/libpthread.abilist +++ b/sysdeps/unix/sysv/linux/i386/libpthread.abilist @@ -24,7 +24,6 @@ GLIBC_2.0 __pthread_setspecific F GLIBC_2.0 __read F GLIBC_2.0 __send F GLIBC_2.0 __sigaction F -GLIBC_2.0 __wait F GLIBC_2.0 __write F GLIBC_2.0 _pthread_cleanup_pop F GLIBC_2.0 _pthread_cleanup_pop_restore F @@ -103,7 +102,6 @@ GLIBC_2.0 siglongjmp F GLIBC_2.0 sigwait F GLIBC_2.0 system F GLIBC_2.0 tcdrain F -GLIBC_2.0 wait F GLIBC_2.0 waitpid F GLIBC_2.0 write F GLIBC_2.1 __libc_allocate_rtsig F diff --git a/sysdeps/unix/sysv/linux/ia64/libpthread.abilist b/sysdeps/unix/sysv/linux/ia64/libpthread.abilist index c065ddbf67..d15b0f09d8 100644 --- a/sysdeps/unix/sysv/linux/ia64/libpthread.abilist +++ b/sysdeps/unix/sysv/linux/ia64/libpthread.abilist @@ -18,7 +18,6 @@ GLIBC_2.2 __h_errno_location F GLIBC_2.2 __libc_allocate_rtsig F GLIBC_2.2 __libc_current_sigrtmax F GLIBC_2.2 __libc_current_sigrtmin F -GLIBC_2.2 __libpthread_version_placeholder F GLIBC_2.2 __lseek F GLIBC_2.2 __open F GLIBC_2.2 __open64 F @@ -47,7 +46,6 @@ GLIBC_2.2 __read F GLIBC_2.2 __res_state F GLIBC_2.2 __send F GLIBC_2.2 __sigaction F -GLIBC_2.2 __wait F GLIBC_2.2 __write F GLIBC_2.2 _pthread_cleanup_pop F GLIBC_2.2 _pthread_cleanup_pop_restore F @@ -181,7 +179,6 @@ GLIBC_2.2 siglongjmp F GLIBC_2.2 sigwait F GLIBC_2.2 system F GLIBC_2.2 tcdrain F -GLIBC_2.2 wait F GLIBC_2.2 waitpid F GLIBC_2.2 write F GLIBC_2.2.3 pthread_getattr_np F diff --git a/sysdeps/unix/sysv/linux/m68k/coldfire/libpthread.abilist b/sysdeps/unix/sysv/linux/m68k/coldfire/libpthread.abilist index c5b7aeb7c4..428aac48e6 100644 --- a/sysdeps/unix/sysv/linux/m68k/coldfire/libpthread.abilist +++ b/sysdeps/unix/sysv/linux/m68k/coldfire/libpthread.abilist @@ -79,7 +79,6 @@ GLIBC_2.4 __read F GLIBC_2.4 __res_state F GLIBC_2.4 __send F GLIBC_2.4 __sigaction F -GLIBC_2.4 __wait F GLIBC_2.4 __write F GLIBC_2.4 _pthread_cleanup_pop F GLIBC_2.4 _pthread_cleanup_pop_restore F @@ -232,6 +231,5 @@ GLIBC_2.4 siglongjmp F GLIBC_2.4 sigwait F GLIBC_2.4 system F GLIBC_2.4 tcdrain F -GLIBC_2.4 wait F GLIBC_2.4 waitpid F GLIBC_2.4 write F diff --git a/sysdeps/unix/sysv/linux/m68k/m680x0/libpthread.abilist b/sysdeps/unix/sysv/linux/m68k/m680x0/libpthread.abilist index 5d1bf0f5ab..a35cbdb0e4 100644 --- a/sysdeps/unix/sysv/linux/m68k/m680x0/libpthread.abilist +++ b/sysdeps/unix/sysv/linux/m68k/m680x0/libpthread.abilist @@ -24,7 +24,6 @@ GLIBC_2.0 __pthread_setspecific F GLIBC_2.0 __read F GLIBC_2.0 __send F GLIBC_2.0 __sigaction F -GLIBC_2.0 __wait F GLIBC_2.0 __write F GLIBC_2.0 _pthread_cleanup_pop F GLIBC_2.0 _pthread_cleanup_pop_restore F @@ -103,7 +102,6 @@ GLIBC_2.0 siglongjmp F GLIBC_2.0 sigwait F GLIBC_2.0 system F GLIBC_2.0 tcdrain F -GLIBC_2.0 wait F GLIBC_2.0 waitpid F GLIBC_2.0 write F GLIBC_2.1 __libc_allocate_rtsig F diff --git a/sysdeps/unix/sysv/linux/microblaze/be/libpthread.abilist b/sysdeps/unix/sysv/linux/microblaze/be/libpthread.abilist index bf777df285..50002eb438 100644 --- a/sysdeps/unix/sysv/linux/microblaze/be/libpthread.abilist +++ b/sysdeps/unix/sysv/linux/microblaze/be/libpthread.abilist @@ -44,7 +44,6 @@ GLIBC_2.18 __read F GLIBC_2.18 __res_state F GLIBC_2.18 __send F GLIBC_2.18 __sigaction F -GLIBC_2.18 __wait F GLIBC_2.18 __write F GLIBC_2.18 _pthread_cleanup_pop F GLIBC_2.18 _pthread_cleanup_pop_restore F @@ -205,7 +204,6 @@ GLIBC_2.18 siglongjmp F GLIBC_2.18 sigwait F GLIBC_2.18 system F GLIBC_2.18 tcdrain F -GLIBC_2.18 wait F GLIBC_2.18 waitpid F GLIBC_2.18 write F GLIBC_2.28 call_once F diff --git a/sysdeps/unix/sysv/linux/microblaze/le/libpthread.abilist b/sysdeps/unix/sysv/linux/microblaze/le/libpthread.abilist index bf777df285..50002eb438 100644 --- a/sysdeps/unix/sysv/linux/microblaze/le/libpthread.abilist +++ b/sysdeps/unix/sysv/linux/microblaze/le/libpthread.abilist @@ -44,7 +44,6 @@ GLIBC_2.18 __read F GLIBC_2.18 __res_state F GLIBC_2.18 __send F GLIBC_2.18 __sigaction F -GLIBC_2.18 __wait F GLIBC_2.18 __write F GLIBC_2.18 _pthread_cleanup_pop F GLIBC_2.18 _pthread_cleanup_pop_restore F @@ -205,7 +204,6 @@ GLIBC_2.18 siglongjmp F GLIBC_2.18 sigwait F GLIBC_2.18 system F GLIBC_2.18 tcdrain F -GLIBC_2.18 wait F GLIBC_2.18 waitpid F GLIBC_2.18 write F GLIBC_2.28 call_once F diff --git a/sysdeps/unix/sysv/linux/mips/mips32/libpthread.abilist b/sysdeps/unix/sysv/linux/mips/mips32/libpthread.abilist index 1b5fd5e751..93558db21f 100644 --- a/sysdeps/unix/sysv/linux/mips/mips32/libpthread.abilist +++ b/sysdeps/unix/sysv/linux/mips/mips32/libpthread.abilist @@ -24,7 +24,6 @@ GLIBC_2.0 __pthread_setspecific F GLIBC_2.0 __read F GLIBC_2.0 __send F GLIBC_2.0 __sigaction F -GLIBC_2.0 __wait F GLIBC_2.0 __write F GLIBC_2.0 _pthread_cleanup_pop F GLIBC_2.0 _pthread_cleanup_pop_restore F @@ -103,7 +102,6 @@ GLIBC_2.0 siglongjmp F GLIBC_2.0 sigwait F GLIBC_2.0 system F GLIBC_2.0 tcdrain F -GLIBC_2.0 wait F GLIBC_2.0 waitpid F GLIBC_2.0 write F GLIBC_2.11 pthread_sigqueue F @@ -117,7 +115,6 @@ GLIBC_2.18 pthread_setattr_default_np F GLIBC_2.2 __libc_allocate_rtsig F GLIBC_2.2 __libc_current_sigrtmax F GLIBC_2.2 __libc_current_sigrtmin F -GLIBC_2.2 __libpthread_version_placeholder F GLIBC_2.2 __open64 F GLIBC_2.2 __pread64 F GLIBC_2.2 __pthread_rwlock_destroy F diff --git a/sysdeps/unix/sysv/linux/mips/mips64/libpthread.abilist b/sysdeps/unix/sysv/linux/mips/mips64/libpthread.abilist index 1b5fd5e751..93558db21f 100644 --- a/sysdeps/unix/sysv/linux/mips/mips64/libpthread.abilist +++ b/sysdeps/unix/sysv/linux/mips/mips64/libpthread.abilist @@ -24,7 +24,6 @@ GLIBC_2.0 __pthread_setspecific F GLIBC_2.0 __read F GLIBC_2.0 __send F GLIBC_2.0 __sigaction F -GLIBC_2.0 __wait F GLIBC_2.0 __write F GLIBC_2.0 _pthread_cleanup_pop F GLIBC_2.0 _pthread_cleanup_pop_restore F @@ -103,7 +102,6 @@ GLIBC_2.0 siglongjmp F GLIBC_2.0 sigwait F GLIBC_2.0 system F GLIBC_2.0 tcdrain F -GLIBC_2.0 wait F GLIBC_2.0 waitpid F GLIBC_2.0 write F GLIBC_2.11 pthread_sigqueue F @@ -117,7 +115,6 @@ GLIBC_2.18 pthread_setattr_default_np F GLIBC_2.2 __libc_allocate_rtsig F GLIBC_2.2 __libc_current_sigrtmax F GLIBC_2.2 __libc_current_sigrtmin F -GLIBC_2.2 __libpthread_version_placeholder F GLIBC_2.2 __open64 F GLIBC_2.2 __pread64 F GLIBC_2.2 __pthread_rwlock_destroy F diff --git a/sysdeps/unix/sysv/linux/nios2/libpthread.abilist b/sysdeps/unix/sysv/linux/nios2/libpthread.abilist index 03a462ef91..226cf52615 100644 --- a/sysdeps/unix/sysv/linux/nios2/libpthread.abilist +++ b/sysdeps/unix/sysv/linux/nios2/libpthread.abilist @@ -44,7 +44,6 @@ GLIBC_2.21 __read F GLIBC_2.21 __res_state F GLIBC_2.21 __send F GLIBC_2.21 __sigaction F -GLIBC_2.21 __wait F GLIBC_2.21 __write F GLIBC_2.21 _pthread_cleanup_pop F GLIBC_2.21 _pthread_cleanup_pop_restore F @@ -205,7 +204,6 @@ GLIBC_2.21 siglongjmp F GLIBC_2.21 sigwait F GLIBC_2.21 system F GLIBC_2.21 tcdrain F -GLIBC_2.21 wait F GLIBC_2.21 waitpid F GLIBC_2.21 write F GLIBC_2.28 call_once F diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/libpthread.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/libpthread.abilist index 0245103a0b..6ddac21923 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/libpthread.abilist +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/libpthread.abilist @@ -24,7 +24,6 @@ GLIBC_2.0 __pthread_setspecific F GLIBC_2.0 __read F GLIBC_2.0 __send F GLIBC_2.0 __sigaction F -GLIBC_2.0 __wait F GLIBC_2.0 __write F GLIBC_2.0 _pthread_cleanup_pop F GLIBC_2.0 _pthread_cleanup_pop_restore F @@ -103,7 +102,6 @@ GLIBC_2.0 siglongjmp F GLIBC_2.0 sigwait F GLIBC_2.0 system F GLIBC_2.0 tcdrain F -GLIBC_2.0 wait F GLIBC_2.0 waitpid F GLIBC_2.0 write F GLIBC_2.1 __libc_allocate_rtsig F diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libpthread.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libpthread.abilist index 618004a931..c97f8ee3df 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libpthread.abilist +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libpthread.abilist @@ -67,7 +67,6 @@ GLIBC_2.3 __read F GLIBC_2.3 __res_state F GLIBC_2.3 __send F GLIBC_2.3 __sigaction F -GLIBC_2.3 __wait F GLIBC_2.3 __write F GLIBC_2.3 _pthread_cleanup_pop F GLIBC_2.3 _pthread_cleanup_pop_restore F @@ -201,7 +200,6 @@ GLIBC_2.3 siglongjmp F GLIBC_2.3 sigwait F GLIBC_2.3 system F GLIBC_2.3 tcdrain F -GLIBC_2.3 wait F GLIBC_2.3 waitpid F GLIBC_2.3 write F GLIBC_2.3.2 pthread_cond_broadcast F diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libpthread.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libpthread.abilist index 98a8473fcd..cfa71ef697 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libpthread.abilist +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libpthread.abilist @@ -44,7 +44,6 @@ GLIBC_2.17 __read F GLIBC_2.17 __res_state F GLIBC_2.17 __send F GLIBC_2.17 __sigaction F -GLIBC_2.17 __wait F GLIBC_2.17 __write F GLIBC_2.17 _pthread_cleanup_pop F GLIBC_2.17 _pthread_cleanup_pop_restore F @@ -203,7 +202,6 @@ GLIBC_2.17 siglongjmp F GLIBC_2.17 sigwait F GLIBC_2.17 system F GLIBC_2.17 tcdrain F -GLIBC_2.17 wait F GLIBC_2.17 waitpid F GLIBC_2.17 write F GLIBC_2.18 pthread_getattr_default_np F diff --git a/sysdeps/unix/sysv/linux/riscv/rv64/libpthread.abilist b/sysdeps/unix/sysv/linux/riscv/rv64/libpthread.abilist index d44217ac85..0ed3f137be 100644 --- a/sysdeps/unix/sysv/linux/riscv/rv64/libpthread.abilist +++ b/sysdeps/unix/sysv/linux/riscv/rv64/libpthread.abilist @@ -43,7 +43,6 @@ GLIBC_2.27 __read F GLIBC_2.27 __res_state F GLIBC_2.27 __send F GLIBC_2.27 __sigaction F -GLIBC_2.27 __wait F GLIBC_2.27 __write F GLIBC_2.27 _pthread_cleanup_pop F GLIBC_2.27 _pthread_cleanup_pop_restore F @@ -200,7 +199,6 @@ GLIBC_2.27 sendto F GLIBC_2.27 sigaction F GLIBC_2.27 sigwait F GLIBC_2.27 tcdrain F -GLIBC_2.27 wait F GLIBC_2.27 waitpid F GLIBC_2.27 write F GLIBC_2.28 call_once F diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/libpthread.abilist b/sysdeps/unix/sysv/linux/s390/s390-32/libpthread.abilist index 429d8b6224..3ef6e2169b 100644 --- a/sysdeps/unix/sysv/linux/s390/s390-32/libpthread.abilist +++ b/sysdeps/unix/sysv/linux/s390/s390-32/libpthread.abilist @@ -24,7 +24,6 @@ GLIBC_2.0 __pthread_setspecific F GLIBC_2.0 __read F GLIBC_2.0 __send F GLIBC_2.0 __sigaction F -GLIBC_2.0 __wait F GLIBC_2.0 __write F GLIBC_2.0 _pthread_cleanup_pop F GLIBC_2.0 _pthread_cleanup_pop_restore F @@ -103,7 +102,6 @@ GLIBC_2.0 siglongjmp F GLIBC_2.0 sigwait F GLIBC_2.0 system F GLIBC_2.0 tcdrain F -GLIBC_2.0 wait F GLIBC_2.0 waitpid F GLIBC_2.0 write F GLIBC_2.1 __libc_allocate_rtsig F diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/libpthread.abilist b/sysdeps/unix/sysv/linux/s390/s390-64/libpthread.abilist index d42e1fc4b0..b2326477ae 100644 --- a/sysdeps/unix/sysv/linux/s390/s390-64/libpthread.abilist +++ b/sysdeps/unix/sysv/linux/s390/s390-64/libpthread.abilist @@ -20,7 +20,6 @@ GLIBC_2.2 __h_errno_location F GLIBC_2.2 __libc_allocate_rtsig F GLIBC_2.2 __libc_current_sigrtmax F GLIBC_2.2 __libc_current_sigrtmin F -GLIBC_2.2 __libpthread_version_placeholder F GLIBC_2.2 __lseek F GLIBC_2.2 __open F GLIBC_2.2 __open64 F @@ -49,7 +48,6 @@ GLIBC_2.2 __read F GLIBC_2.2 __res_state F GLIBC_2.2 __send F GLIBC_2.2 __sigaction F -GLIBC_2.2 __wait F GLIBC_2.2 __write F GLIBC_2.2 _pthread_cleanup_pop F GLIBC_2.2 _pthread_cleanup_pop_restore F @@ -183,7 +181,6 @@ GLIBC_2.2 siglongjmp F GLIBC_2.2 sigwait F GLIBC_2.2 system F GLIBC_2.2 tcdrain F -GLIBC_2.2 wait F GLIBC_2.2 waitpid F GLIBC_2.2 write F GLIBC_2.2.3 pthread_getattr_np F diff --git a/sysdeps/unix/sysv/linux/sh/be/libpthread.abilist b/sysdeps/unix/sysv/linux/sh/be/libpthread.abilist index d87fadf3d8..9b7c7dae3f 100644 --- a/sysdeps/unix/sysv/linux/sh/be/libpthread.abilist +++ b/sysdeps/unix/sysv/linux/sh/be/libpthread.abilist @@ -18,7 +18,6 @@ GLIBC_2.2 __h_errno_location F GLIBC_2.2 __libc_allocate_rtsig F GLIBC_2.2 __libc_current_sigrtmax F GLIBC_2.2 __libc_current_sigrtmin F -GLIBC_2.2 __libpthread_version_placeholder F GLIBC_2.2 __lseek F GLIBC_2.2 __open F GLIBC_2.2 __open64 F @@ -47,7 +46,6 @@ GLIBC_2.2 __read F GLIBC_2.2 __res_state F GLIBC_2.2 __send F GLIBC_2.2 __sigaction F -GLIBC_2.2 __wait F GLIBC_2.2 __write F GLIBC_2.2 _pthread_cleanup_pop F GLIBC_2.2 _pthread_cleanup_pop_restore F @@ -181,7 +179,6 @@ GLIBC_2.2 siglongjmp F GLIBC_2.2 sigwait F GLIBC_2.2 system F GLIBC_2.2 tcdrain F -GLIBC_2.2 wait F GLIBC_2.2 waitpid F GLIBC_2.2 write F GLIBC_2.2.3 pthread_getattr_np F diff --git a/sysdeps/unix/sysv/linux/sh/le/libpthread.abilist b/sysdeps/unix/sysv/linux/sh/le/libpthread.abilist index d87fadf3d8..9b7c7dae3f 100644 --- a/sysdeps/unix/sysv/linux/sh/le/libpthread.abilist +++ b/sysdeps/unix/sysv/linux/sh/le/libpthread.abilist @@ -18,7 +18,6 @@ GLIBC_2.2 __h_errno_location F GLIBC_2.2 __libc_allocate_rtsig F GLIBC_2.2 __libc_current_sigrtmax F GLIBC_2.2 __libc_current_sigrtmin F -GLIBC_2.2 __libpthread_version_placeholder F GLIBC_2.2 __lseek F GLIBC_2.2 __open F GLIBC_2.2 __open64 F @@ -47,7 +46,6 @@ GLIBC_2.2 __read F GLIBC_2.2 __res_state F GLIBC_2.2 __send F GLIBC_2.2 __sigaction F -GLIBC_2.2 __wait F GLIBC_2.2 __write F GLIBC_2.2 _pthread_cleanup_pop F GLIBC_2.2 _pthread_cleanup_pop_restore F @@ -181,7 +179,6 @@ GLIBC_2.2 siglongjmp F GLIBC_2.2 sigwait F GLIBC_2.2 system F GLIBC_2.2 tcdrain F -GLIBC_2.2 wait F GLIBC_2.2 waitpid F GLIBC_2.2 write F GLIBC_2.2.3 pthread_getattr_np F diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/libpthread.abilist b/sysdeps/unix/sysv/linux/sparc/sparc32/libpthread.abilist index f42bcffd1e..ddb500a9d7 100644 --- a/sysdeps/unix/sysv/linux/sparc/sparc32/libpthread.abilist +++ b/sysdeps/unix/sysv/linux/sparc/sparc32/libpthread.abilist @@ -24,7 +24,6 @@ GLIBC_2.0 __pthread_setspecific F GLIBC_2.0 __read F GLIBC_2.0 __send F GLIBC_2.0 __sigaction F -GLIBC_2.0 __wait F GLIBC_2.0 __write F GLIBC_2.0 _pthread_cleanup_pop F GLIBC_2.0 _pthread_cleanup_pop_restore F @@ -103,7 +102,6 @@ GLIBC_2.0 siglongjmp F GLIBC_2.0 sigwait F GLIBC_2.0 system F GLIBC_2.0 tcdrain F -GLIBC_2.0 wait F GLIBC_2.0 waitpid F GLIBC_2.0 write F GLIBC_2.1 __libc_allocate_rtsig F diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/libpthread.abilist b/sysdeps/unix/sysv/linux/sparc/sparc64/libpthread.abilist index c065ddbf67..d15b0f09d8 100644 --- a/sysdeps/unix/sysv/linux/sparc/sparc64/libpthread.abilist +++ b/sysdeps/unix/sysv/linux/sparc/sparc64/libpthread.abilist @@ -18,7 +18,6 @@ GLIBC_2.2 __h_errno_location F GLIBC_2.2 __libc_allocate_rtsig F GLIBC_2.2 __libc_current_sigrtmax F GLIBC_2.2 __libc_current_sigrtmin F -GLIBC_2.2 __libpthread_version_placeholder F GLIBC_2.2 __lseek F GLIBC_2.2 __open F GLIBC_2.2 __open64 F @@ -47,7 +46,6 @@ GLIBC_2.2 __read F GLIBC_2.2 __res_state F GLIBC_2.2 __send F GLIBC_2.2 __sigaction F -GLIBC_2.2 __wait F GLIBC_2.2 __write F GLIBC_2.2 _pthread_cleanup_pop F GLIBC_2.2 _pthread_cleanup_pop_restore F @@ -181,7 +179,6 @@ GLIBC_2.2 siglongjmp F GLIBC_2.2 sigwait F GLIBC_2.2 system F GLIBC_2.2 tcdrain F -GLIBC_2.2 wait F GLIBC_2.2 waitpid F GLIBC_2.2 write F GLIBC_2.2.3 pthread_getattr_np F diff --git a/sysdeps/unix/sysv/linux/x86_64/64/libpthread.abilist b/sysdeps/unix/sysv/linux/x86_64/64/libpthread.abilist index 610562bd40..ca00d79b0c 100644 --- a/sysdeps/unix/sysv/linux/x86_64/64/libpthread.abilist +++ b/sysdeps/unix/sysv/linux/x86_64/64/libpthread.abilist @@ -18,7 +18,6 @@ GLIBC_2.2.5 __h_errno_location F GLIBC_2.2.5 __libc_allocate_rtsig F GLIBC_2.2.5 __libc_current_sigrtmax F GLIBC_2.2.5 __libc_current_sigrtmin F -GLIBC_2.2.5 __libpthread_version_placeholder F GLIBC_2.2.5 __lseek F GLIBC_2.2.5 __open F GLIBC_2.2.5 __open64 F @@ -47,7 +46,6 @@ GLIBC_2.2.5 __read F GLIBC_2.2.5 __res_state F GLIBC_2.2.5 __send F GLIBC_2.2.5 __sigaction F -GLIBC_2.2.5 __wait F GLIBC_2.2.5 __write F GLIBC_2.2.5 _pthread_cleanup_pop F GLIBC_2.2.5 _pthread_cleanup_pop_restore F @@ -182,7 +180,6 @@ GLIBC_2.2.5 siglongjmp F GLIBC_2.2.5 sigwait F GLIBC_2.2.5 system F GLIBC_2.2.5 tcdrain F -GLIBC_2.2.5 wait F GLIBC_2.2.5 waitpid F GLIBC_2.2.5 write F GLIBC_2.28 call_once F diff --git a/sysdeps/unix/sysv/linux/x86_64/x32/libpthread.abilist b/sysdeps/unix/sysv/linux/x86_64/x32/libpthread.abilist index aadd9eb0fa..ae748ed431 100644 --- a/sysdeps/unix/sysv/linux/x86_64/x32/libpthread.abilist +++ b/sysdeps/unix/sysv/linux/x86_64/x32/libpthread.abilist @@ -44,7 +44,6 @@ GLIBC_2.16 __read F GLIBC_2.16 __res_state F GLIBC_2.16 __send F GLIBC_2.16 __sigaction F -GLIBC_2.16 __wait F GLIBC_2.16 __write F GLIBC_2.16 _pthread_cleanup_pop F GLIBC_2.16 _pthread_cleanup_pop_restore F @@ -203,7 +202,6 @@ GLIBC_2.16 siglongjmp F GLIBC_2.16 sigwait F GLIBC_2.16 system F GLIBC_2.16 tcdrain F -GLIBC_2.16 wait F GLIBC_2.16 waitpid F GLIBC_2.16 write F GLIBC_2.18 pthread_getattr_default_np F From patchwork Thu Nov 14 14:47:00 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella Netto X-Patchwork-Id: 1194868 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=libc-alpha-return-107083-incoming=patchwork.ozlabs.org@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.b="ZUi0Hgo9"; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="XhqmCKz7"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 47DPTx31cBz9s7T for ; Fri, 15 Nov 2019 01:47:49 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:date:message-id:in-reply-to :references; q=dns; s=default; b=B1HpUs4Sek7tCs6r9Pnxo3tfSmxS6a/ nrDCVdjTWrxedVsfPGmTtFVY2cHX2cezUQRti870BvRVuaP0mLceZSZ2V5RTuxCp 4eym2hjg3CmbEoBFVt54HjcHXhjWm420a1WHroej+Z9nLkeAB5XAk4gBipwTFxWD TcSeJymx/at4= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:date:message-id:in-reply-to :references; s=default; bh=bdLgAAd8e/z6wI8qsNdE7EeUcKU=; b=ZUi0H go9Q1HXs52Up1NtBIOz0Bi8XuiC5f1aRz3Q90kPbu2XLp3XqqKJeldtJl35lLFaN HmqGqNy5Let7tsv+X7lllekRmWjRBFfT3M27IGUKg+uvGiKNjRwsjUJe8cZjUq46 CeQ+fpU74OzojVcXwAMEhDqLNVD7IkxkkIaQOU= Received: (qmail 29643 invoked by alias); 14 Nov 2019 14:47:19 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 29503 invoked by uid 89); 14 Nov 2019 14:47:19 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-21.6 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.1 spammy=2026 X-HELO: mail-qt1-f171.google.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=U48HfhxEmV+UWirBSTo7Dps1REsFHmSWLWnDKAlStOo=; b=XhqmCKz7AG7nJ4Ha6QTGzxRFhgutyNcGIdK639Bwx9VCtdKL04yur98kaCgKOCvELs rtsXi7CFcHhgwK0GePiJbsU81lsQn7NBB+vWMWVyrdZkM92g0P28ffm/ukqODnf00tY9 F/kD7PNbik4J7CySt6vkJ443PF0DZoJob9HPU9BWAT54J9vLB9sVN5nehN6qGzYTriA8 JaVZ676qPRiNSAB/RVZETA/UIv5oWgVhh0Wx0Ok0J3tdZvO2twmT8kCGiCc/eIVOYtW4 OT99oMevQob5pMOOkM5Gsa4AHf0EVw1nGlSRqbRnOWoovrDScC7WDbjIAfwRWtudZYs7 +DUA== From: Adhemerval Zanella To: libc-alpha@sourceware.org Cc: Alistair Francis , alistair23@gmail.com Subject: [PATCH 3/7] nptl: Move waitpid implementation to libc Date: Thu, 14 Nov 2019 11:47:00 -0300 Message-Id: <20191114144704.19002-3-adhemerval.zanella@linaro.org> In-Reply-To: <20191114144704.19002-1-adhemerval.zanella@linaro.org> References: <20191114144704.19002-1-adhemerval.zanella@linaro.org> Checked on x86_64-linux-gnu and powerpc64le-linux-gnu. --- nptl/Makefile | 3 +-- nptl/Versions | 2 +- sysdeps/unix/sysv/linux/aarch64/libpthread.abilist | 1 - sysdeps/unix/sysv/linux/alpha/libpthread.abilist | 1 - sysdeps/unix/sysv/linux/arm/be/libpthread.abilist | 1 - sysdeps/unix/sysv/linux/arm/le/libpthread.abilist | 1 - sysdeps/unix/sysv/linux/csky/libpthread.abilist | 1 - sysdeps/unix/sysv/linux/hppa/libpthread.abilist | 1 - sysdeps/unix/sysv/linux/i386/libpthread.abilist | 1 - sysdeps/unix/sysv/linux/ia64/libpthread.abilist | 1 - sysdeps/unix/sysv/linux/m68k/coldfire/libpthread.abilist | 1 - sysdeps/unix/sysv/linux/m68k/m680x0/libpthread.abilist | 1 - sysdeps/unix/sysv/linux/microblaze/be/libpthread.abilist | 1 - sysdeps/unix/sysv/linux/microblaze/le/libpthread.abilist | 1 - sysdeps/unix/sysv/linux/mips/mips32/libpthread.abilist | 1 - sysdeps/unix/sysv/linux/mips/mips64/libpthread.abilist | 1 - sysdeps/unix/sysv/linux/nios2/libpthread.abilist | 1 - sysdeps/unix/sysv/linux/powerpc/powerpc32/libpthread.abilist | 1 - .../unix/sysv/linux/powerpc/powerpc64/be/libpthread.abilist | 1 - .../unix/sysv/linux/powerpc/powerpc64/le/libpthread.abilist | 1 - sysdeps/unix/sysv/linux/riscv/rv64/libpthread.abilist | 1 - sysdeps/unix/sysv/linux/s390/s390-32/libpthread.abilist | 1 - sysdeps/unix/sysv/linux/s390/s390-64/libpthread.abilist | 1 - sysdeps/unix/sysv/linux/sh/be/libpthread.abilist | 1 - sysdeps/unix/sysv/linux/sh/le/libpthread.abilist | 1 - sysdeps/unix/sysv/linux/sparc/sparc32/libpthread.abilist | 1 - sysdeps/unix/sysv/linux/sparc/sparc64/libpthread.abilist | 1 - sysdeps/unix/sysv/linux/x86_64/64/libpthread.abilist | 1 - sysdeps/unix/sysv/linux/x86_64/x32/libpthread.abilist | 1 - 29 files changed, 2 insertions(+), 30 deletions(-) diff --git a/nptl/Makefile b/nptl/Makefile index f93d41176f..35f998754b 100644 --- a/nptl/Makefile +++ b/nptl/Makefile @@ -46,7 +46,7 @@ pthread-compat-wrappers = \ sendto fsync lseek lseek64 \ msync open open64 pause \ pread pread64 pwrite pwrite64 \ - tcdrain waitpid msgrcv msgsnd \ + tcdrain msgrcv msgsnd \ sigwait sigsuspend \ recvmsg sendmsg @@ -205,7 +205,6 @@ CFLAGS-pread.c += -fexceptions -fasynchronous-unwind-tables CFLAGS-pread64.c += -fexceptions -fasynchronous-unwind-tables CFLAGS-pwrite.c += -fexceptions -fasynchronous-unwind-tables CFLAGS-pwrite64.c += -fexceptions -fasynchronous-unwind-tables -CFLAGS-waitpid.c += -fexceptions -fasynchronous-unwind-tables CFLAGS-sigwait.c += -fexceptions -fasynchronous-unwind-tables CFLAGS-msgrcv.c += -fexceptions -fasynchronous-unwind-tables CFLAGS-msgsnd.c += -fexceptions -fasynchronous-unwind-tables diff --git a/nptl/Versions b/nptl/Versions index 1dda4b9064..ff6fc06002 100644 --- a/nptl/Versions +++ b/nptl/Versions @@ -99,7 +99,7 @@ libpthread { close; __close; fcntl; __fcntl; read; __read; write; __write; accept; connect; __connect; recv; recvfrom; recvmsg; send; __send; sendmsg; sendto; fsync; lseek; __lseek; msync; open; __open; pause; tcdrain; - system; waitpid; + system; # Hidden entry point (through macros). _pthread_cleanup_push; _pthread_cleanup_pop; diff --git a/sysdeps/unix/sysv/linux/aarch64/libpthread.abilist b/sysdeps/unix/sysv/linux/aarch64/libpthread.abilist index cfa71ef697..7fb670d91f 100644 --- a/sysdeps/unix/sysv/linux/aarch64/libpthread.abilist +++ b/sysdeps/unix/sysv/linux/aarch64/libpthread.abilist @@ -202,7 +202,6 @@ GLIBC_2.17 siglongjmp F GLIBC_2.17 sigwait F GLIBC_2.17 system F GLIBC_2.17 tcdrain F -GLIBC_2.17 waitpid F GLIBC_2.17 write F GLIBC_2.18 pthread_getattr_default_np F GLIBC_2.18 pthread_setattr_default_np F diff --git a/sysdeps/unix/sysv/linux/alpha/libpthread.abilist b/sysdeps/unix/sysv/linux/alpha/libpthread.abilist index ddb500a9d7..42679385d7 100644 --- a/sysdeps/unix/sysv/linux/alpha/libpthread.abilist +++ b/sysdeps/unix/sysv/linux/alpha/libpthread.abilist @@ -102,7 +102,6 @@ GLIBC_2.0 siglongjmp F GLIBC_2.0 sigwait F GLIBC_2.0 system F GLIBC_2.0 tcdrain F -GLIBC_2.0 waitpid F GLIBC_2.0 write F GLIBC_2.1 __libc_allocate_rtsig F GLIBC_2.1 __libc_current_sigrtmax F diff --git a/sysdeps/unix/sysv/linux/arm/be/libpthread.abilist b/sysdeps/unix/sysv/linux/arm/be/libpthread.abilist index 428aac48e6..144ef997fe 100644 --- a/sysdeps/unix/sysv/linux/arm/be/libpthread.abilist +++ b/sysdeps/unix/sysv/linux/arm/be/libpthread.abilist @@ -231,5 +231,4 @@ GLIBC_2.4 siglongjmp F GLIBC_2.4 sigwait F GLIBC_2.4 system F GLIBC_2.4 tcdrain F -GLIBC_2.4 waitpid F GLIBC_2.4 write F diff --git a/sysdeps/unix/sysv/linux/arm/le/libpthread.abilist b/sysdeps/unix/sysv/linux/arm/le/libpthread.abilist index 428aac48e6..144ef997fe 100644 --- a/sysdeps/unix/sysv/linux/arm/le/libpthread.abilist +++ b/sysdeps/unix/sysv/linux/arm/le/libpthread.abilist @@ -231,5 +231,4 @@ GLIBC_2.4 siglongjmp F GLIBC_2.4 sigwait F GLIBC_2.4 system F GLIBC_2.4 tcdrain F -GLIBC_2.4 waitpid F GLIBC_2.4 write F diff --git a/sysdeps/unix/sysv/linux/csky/libpthread.abilist b/sysdeps/unix/sysv/linux/csky/libpthread.abilist index 7c17230afd..4edf765af2 100644 --- a/sysdeps/unix/sysv/linux/csky/libpthread.abilist +++ b/sysdeps/unix/sysv/linux/csky/libpthread.abilist @@ -218,7 +218,6 @@ GLIBC_2.29 tss_create F GLIBC_2.29 tss_delete F GLIBC_2.29 tss_get F GLIBC_2.29 tss_set F -GLIBC_2.29 waitpid F GLIBC_2.29 write F GLIBC_2.30 pthread_cond_clockwait F GLIBC_2.30 pthread_mutex_clocklock F diff --git a/sysdeps/unix/sysv/linux/hppa/libpthread.abilist b/sysdeps/unix/sysv/linux/hppa/libpthread.abilist index 9b7c7dae3f..a5dfdef124 100644 --- a/sysdeps/unix/sysv/linux/hppa/libpthread.abilist +++ b/sysdeps/unix/sysv/linux/hppa/libpthread.abilist @@ -179,7 +179,6 @@ GLIBC_2.2 siglongjmp F GLIBC_2.2 sigwait F GLIBC_2.2 system F GLIBC_2.2 tcdrain F -GLIBC_2.2 waitpid F GLIBC_2.2 write F GLIBC_2.2.3 pthread_getattr_np F GLIBC_2.28 call_once F diff --git a/sysdeps/unix/sysv/linux/i386/libpthread.abilist b/sysdeps/unix/sysv/linux/i386/libpthread.abilist index a35cbdb0e4..94e5ea5d0b 100644 --- a/sysdeps/unix/sysv/linux/i386/libpthread.abilist +++ b/sysdeps/unix/sysv/linux/i386/libpthread.abilist @@ -102,7 +102,6 @@ GLIBC_2.0 siglongjmp F GLIBC_2.0 sigwait F GLIBC_2.0 system F GLIBC_2.0 tcdrain F -GLIBC_2.0 waitpid F GLIBC_2.0 write F GLIBC_2.1 __libc_allocate_rtsig F GLIBC_2.1 __libc_current_sigrtmax F diff --git a/sysdeps/unix/sysv/linux/ia64/libpthread.abilist b/sysdeps/unix/sysv/linux/ia64/libpthread.abilist index d15b0f09d8..f71c61da1f 100644 --- a/sysdeps/unix/sysv/linux/ia64/libpthread.abilist +++ b/sysdeps/unix/sysv/linux/ia64/libpthread.abilist @@ -179,7 +179,6 @@ GLIBC_2.2 siglongjmp F GLIBC_2.2 sigwait F GLIBC_2.2 system F GLIBC_2.2 tcdrain F -GLIBC_2.2 waitpid F GLIBC_2.2 write F GLIBC_2.2.3 pthread_getattr_np F GLIBC_2.28 call_once F diff --git a/sysdeps/unix/sysv/linux/m68k/coldfire/libpthread.abilist b/sysdeps/unix/sysv/linux/m68k/coldfire/libpthread.abilist index 428aac48e6..144ef997fe 100644 --- a/sysdeps/unix/sysv/linux/m68k/coldfire/libpthread.abilist +++ b/sysdeps/unix/sysv/linux/m68k/coldfire/libpthread.abilist @@ -231,5 +231,4 @@ GLIBC_2.4 siglongjmp F GLIBC_2.4 sigwait F GLIBC_2.4 system F GLIBC_2.4 tcdrain F -GLIBC_2.4 waitpid F GLIBC_2.4 write F diff --git a/sysdeps/unix/sysv/linux/m68k/m680x0/libpthread.abilist b/sysdeps/unix/sysv/linux/m68k/m680x0/libpthread.abilist index a35cbdb0e4..94e5ea5d0b 100644 --- a/sysdeps/unix/sysv/linux/m68k/m680x0/libpthread.abilist +++ b/sysdeps/unix/sysv/linux/m68k/m680x0/libpthread.abilist @@ -102,7 +102,6 @@ GLIBC_2.0 siglongjmp F GLIBC_2.0 sigwait F GLIBC_2.0 system F GLIBC_2.0 tcdrain F -GLIBC_2.0 waitpid F GLIBC_2.0 write F GLIBC_2.1 __libc_allocate_rtsig F GLIBC_2.1 __libc_current_sigrtmax F diff --git a/sysdeps/unix/sysv/linux/microblaze/be/libpthread.abilist b/sysdeps/unix/sysv/linux/microblaze/be/libpthread.abilist index 50002eb438..40dbd1e7c7 100644 --- a/sysdeps/unix/sysv/linux/microblaze/be/libpthread.abilist +++ b/sysdeps/unix/sysv/linux/microblaze/be/libpthread.abilist @@ -204,7 +204,6 @@ GLIBC_2.18 siglongjmp F GLIBC_2.18 sigwait F GLIBC_2.18 system F GLIBC_2.18 tcdrain F -GLIBC_2.18 waitpid F GLIBC_2.18 write F GLIBC_2.28 call_once F GLIBC_2.28 cnd_broadcast F diff --git a/sysdeps/unix/sysv/linux/microblaze/le/libpthread.abilist b/sysdeps/unix/sysv/linux/microblaze/le/libpthread.abilist index 50002eb438..40dbd1e7c7 100644 --- a/sysdeps/unix/sysv/linux/microblaze/le/libpthread.abilist +++ b/sysdeps/unix/sysv/linux/microblaze/le/libpthread.abilist @@ -204,7 +204,6 @@ GLIBC_2.18 siglongjmp F GLIBC_2.18 sigwait F GLIBC_2.18 system F GLIBC_2.18 tcdrain F -GLIBC_2.18 waitpid F GLIBC_2.18 write F GLIBC_2.28 call_once F GLIBC_2.28 cnd_broadcast F diff --git a/sysdeps/unix/sysv/linux/mips/mips32/libpthread.abilist b/sysdeps/unix/sysv/linux/mips/mips32/libpthread.abilist index 93558db21f..b29ab3d261 100644 --- a/sysdeps/unix/sysv/linux/mips/mips32/libpthread.abilist +++ b/sysdeps/unix/sysv/linux/mips/mips32/libpthread.abilist @@ -102,7 +102,6 @@ GLIBC_2.0 siglongjmp F GLIBC_2.0 sigwait F GLIBC_2.0 system F GLIBC_2.0 tcdrain F -GLIBC_2.0 waitpid F GLIBC_2.0 write F GLIBC_2.11 pthread_sigqueue F GLIBC_2.12 pthread_getname_np F diff --git a/sysdeps/unix/sysv/linux/mips/mips64/libpthread.abilist b/sysdeps/unix/sysv/linux/mips/mips64/libpthread.abilist index 93558db21f..b29ab3d261 100644 --- a/sysdeps/unix/sysv/linux/mips/mips64/libpthread.abilist +++ b/sysdeps/unix/sysv/linux/mips/mips64/libpthread.abilist @@ -102,7 +102,6 @@ GLIBC_2.0 siglongjmp F GLIBC_2.0 sigwait F GLIBC_2.0 system F GLIBC_2.0 tcdrain F -GLIBC_2.0 waitpid F GLIBC_2.0 write F GLIBC_2.11 pthread_sigqueue F GLIBC_2.12 pthread_getname_np F diff --git a/sysdeps/unix/sysv/linux/nios2/libpthread.abilist b/sysdeps/unix/sysv/linux/nios2/libpthread.abilist index 226cf52615..e787d881b5 100644 --- a/sysdeps/unix/sysv/linux/nios2/libpthread.abilist +++ b/sysdeps/unix/sysv/linux/nios2/libpthread.abilist @@ -204,7 +204,6 @@ GLIBC_2.21 siglongjmp F GLIBC_2.21 sigwait F GLIBC_2.21 system F GLIBC_2.21 tcdrain F -GLIBC_2.21 waitpid F GLIBC_2.21 write F GLIBC_2.28 call_once F GLIBC_2.28 cnd_broadcast F diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/libpthread.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/libpthread.abilist index 6ddac21923..acf358b471 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/libpthread.abilist +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/libpthread.abilist @@ -102,7 +102,6 @@ GLIBC_2.0 siglongjmp F GLIBC_2.0 sigwait F GLIBC_2.0 system F GLIBC_2.0 tcdrain F -GLIBC_2.0 waitpid F GLIBC_2.0 write F GLIBC_2.1 __libc_allocate_rtsig F GLIBC_2.1 __libc_current_sigrtmax F diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libpthread.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libpthread.abilist index c97f8ee3df..f6ae27d76b 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libpthread.abilist +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libpthread.abilist @@ -200,7 +200,6 @@ GLIBC_2.3 siglongjmp F GLIBC_2.3 sigwait F GLIBC_2.3 system F GLIBC_2.3 tcdrain F -GLIBC_2.3 waitpid F GLIBC_2.3 write F GLIBC_2.3.2 pthread_cond_broadcast F GLIBC_2.3.2 pthread_cond_destroy F diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libpthread.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libpthread.abilist index cfa71ef697..7fb670d91f 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libpthread.abilist +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libpthread.abilist @@ -202,7 +202,6 @@ GLIBC_2.17 siglongjmp F GLIBC_2.17 sigwait F GLIBC_2.17 system F GLIBC_2.17 tcdrain F -GLIBC_2.17 waitpid F GLIBC_2.17 write F GLIBC_2.18 pthread_getattr_default_np F GLIBC_2.18 pthread_setattr_default_np F diff --git a/sysdeps/unix/sysv/linux/riscv/rv64/libpthread.abilist b/sysdeps/unix/sysv/linux/riscv/rv64/libpthread.abilist index 0ed3f137be..1581991fd5 100644 --- a/sysdeps/unix/sysv/linux/riscv/rv64/libpthread.abilist +++ b/sysdeps/unix/sysv/linux/riscv/rv64/libpthread.abilist @@ -199,7 +199,6 @@ GLIBC_2.27 sendto F GLIBC_2.27 sigaction F GLIBC_2.27 sigwait F GLIBC_2.27 tcdrain F -GLIBC_2.27 waitpid F GLIBC_2.27 write F GLIBC_2.28 call_once F GLIBC_2.28 cnd_broadcast F diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/libpthread.abilist b/sysdeps/unix/sysv/linux/s390/s390-32/libpthread.abilist index 3ef6e2169b..0bffc8f456 100644 --- a/sysdeps/unix/sysv/linux/s390/s390-32/libpthread.abilist +++ b/sysdeps/unix/sysv/linux/s390/s390-32/libpthread.abilist @@ -102,7 +102,6 @@ GLIBC_2.0 siglongjmp F GLIBC_2.0 sigwait F GLIBC_2.0 system F GLIBC_2.0 tcdrain F -GLIBC_2.0 waitpid F GLIBC_2.0 write F GLIBC_2.1 __libc_allocate_rtsig F GLIBC_2.1 __libc_current_sigrtmax F diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/libpthread.abilist b/sysdeps/unix/sysv/linux/s390/s390-64/libpthread.abilist index b2326477ae..bd82c1969a 100644 --- a/sysdeps/unix/sysv/linux/s390/s390-64/libpthread.abilist +++ b/sysdeps/unix/sysv/linux/s390/s390-64/libpthread.abilist @@ -181,7 +181,6 @@ GLIBC_2.2 siglongjmp F GLIBC_2.2 sigwait F GLIBC_2.2 system F GLIBC_2.2 tcdrain F -GLIBC_2.2 waitpid F GLIBC_2.2 write F GLIBC_2.2.3 pthread_getattr_np F GLIBC_2.28 call_once F diff --git a/sysdeps/unix/sysv/linux/sh/be/libpthread.abilist b/sysdeps/unix/sysv/linux/sh/be/libpthread.abilist index 9b7c7dae3f..a5dfdef124 100644 --- a/sysdeps/unix/sysv/linux/sh/be/libpthread.abilist +++ b/sysdeps/unix/sysv/linux/sh/be/libpthread.abilist @@ -179,7 +179,6 @@ GLIBC_2.2 siglongjmp F GLIBC_2.2 sigwait F GLIBC_2.2 system F GLIBC_2.2 tcdrain F -GLIBC_2.2 waitpid F GLIBC_2.2 write F GLIBC_2.2.3 pthread_getattr_np F GLIBC_2.28 call_once F diff --git a/sysdeps/unix/sysv/linux/sh/le/libpthread.abilist b/sysdeps/unix/sysv/linux/sh/le/libpthread.abilist index 9b7c7dae3f..a5dfdef124 100644 --- a/sysdeps/unix/sysv/linux/sh/le/libpthread.abilist +++ b/sysdeps/unix/sysv/linux/sh/le/libpthread.abilist @@ -179,7 +179,6 @@ GLIBC_2.2 siglongjmp F GLIBC_2.2 sigwait F GLIBC_2.2 system F GLIBC_2.2 tcdrain F -GLIBC_2.2 waitpid F GLIBC_2.2 write F GLIBC_2.2.3 pthread_getattr_np F GLIBC_2.28 call_once F diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/libpthread.abilist b/sysdeps/unix/sysv/linux/sparc/sparc32/libpthread.abilist index ddb500a9d7..42679385d7 100644 --- a/sysdeps/unix/sysv/linux/sparc/sparc32/libpthread.abilist +++ b/sysdeps/unix/sysv/linux/sparc/sparc32/libpthread.abilist @@ -102,7 +102,6 @@ GLIBC_2.0 siglongjmp F GLIBC_2.0 sigwait F GLIBC_2.0 system F GLIBC_2.0 tcdrain F -GLIBC_2.0 waitpid F GLIBC_2.0 write F GLIBC_2.1 __libc_allocate_rtsig F GLIBC_2.1 __libc_current_sigrtmax F diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/libpthread.abilist b/sysdeps/unix/sysv/linux/sparc/sparc64/libpthread.abilist index d15b0f09d8..f71c61da1f 100644 --- a/sysdeps/unix/sysv/linux/sparc/sparc64/libpthread.abilist +++ b/sysdeps/unix/sysv/linux/sparc/sparc64/libpthread.abilist @@ -179,7 +179,6 @@ GLIBC_2.2 siglongjmp F GLIBC_2.2 sigwait F GLIBC_2.2 system F GLIBC_2.2 tcdrain F -GLIBC_2.2 waitpid F GLIBC_2.2 write F GLIBC_2.2.3 pthread_getattr_np F GLIBC_2.28 call_once F diff --git a/sysdeps/unix/sysv/linux/x86_64/64/libpthread.abilist b/sysdeps/unix/sysv/linux/x86_64/64/libpthread.abilist index ca00d79b0c..6ec95f4dcc 100644 --- a/sysdeps/unix/sysv/linux/x86_64/64/libpthread.abilist +++ b/sysdeps/unix/sysv/linux/x86_64/64/libpthread.abilist @@ -180,7 +180,6 @@ GLIBC_2.2.5 siglongjmp F GLIBC_2.2.5 sigwait F GLIBC_2.2.5 system F GLIBC_2.2.5 tcdrain F -GLIBC_2.2.5 waitpid F GLIBC_2.2.5 write F GLIBC_2.28 call_once F GLIBC_2.28 cnd_broadcast F diff --git a/sysdeps/unix/sysv/linux/x86_64/x32/libpthread.abilist b/sysdeps/unix/sysv/linux/x86_64/x32/libpthread.abilist index ae748ed431..6d8045dbe0 100644 --- a/sysdeps/unix/sysv/linux/x86_64/x32/libpthread.abilist +++ b/sysdeps/unix/sysv/linux/x86_64/x32/libpthread.abilist @@ -202,7 +202,6 @@ GLIBC_2.16 siglongjmp F GLIBC_2.16 sigwait F GLIBC_2.16 system F GLIBC_2.16 tcdrain F -GLIBC_2.16 waitpid F GLIBC_2.16 write F GLIBC_2.18 pthread_getattr_default_np F GLIBC_2.18 pthread_setattr_default_np F From patchwork Thu Nov 14 14:47:01 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella Netto X-Patchwork-Id: 1194867 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=libc-alpha-return-107082-incoming=patchwork.ozlabs.org@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.b="vpNbN75m"; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="hlqNVYFT"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 47DPTm1h0hz9s7T for ; Fri, 15 Nov 2019 01:47:40 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:date:message-id:in-reply-to :references; q=dns; s=default; b=I3FvPAcNl6B8TSAGGuwyEb3WlPTw8pl oVfoPRhTZ/GUbARGFizQS2W688szME+SePBVRj5aFBETa3hXZgiSc5KKI0b7XH8d H/a3TZEnmc9RvnYo/fWYomtGDXlBoeK0g8ujFQ11bXUp44t722QIJ/cYaTXu5cpJ bXD3lteDTlnQ= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:date:message-id:in-reply-to :references; s=default; bh=fqlkMXHUp6XlXMWVvWWsA5l9zZ0=; b=vpNbN 75mGssXBgO95hSzDdfzZY2LCMiE7qxgLIVabcSLNryU+EzY+JIMxAqVSQu1RTHXt pKR1S8Nfy9Pg2W2nnujrzsRjP9QmVub3Dke7fwXMPErk0OGYZCCL6TVHBZ+N1Yoo FrIVzSCv9HmvvyYgdMGrjQult3dLHJbsLiXp30= Received: (qmail 29562 invoked by alias); 14 Nov 2019 14:47:19 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 29469 invoked by uid 89); 14 Nov 2019 14:47:19 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-21.6 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_SHORT, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.1 spammy= X-HELO: mail-qt1-f193.google.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Z6SLZq1tm477cM4QN+7XZKMHajeWyJcEu7ySStf5JPU=; b=hlqNVYFT/jYX6JFgE9etFbB02TejWo83gyJr84b5JHwBH/PWuvGmBJDSf30V9pzXT6 n+af0I/VnofR4MB8tMHqZT5N7OVq1xfJKcj9N5QniwtUmHT2X06zTMEX1+WH6YqwLu/q Jp6JNSSu7pcIAz5HIPVTZJU4Dg14yLXYPmfVRxyy2xPGXgwQ1axkieiLnUgIZhsu/e8r GQBWUBdlKMWoVPqqb2WgcU/i/aWAluOLNa42ZganDQ7ghSKXi9h8p/5T0oqXGQemvx+3 J7uhuCiVP8MefllL16AIQNQ2yD4Um5BGDXNK4PJKuY1kxrQm8sDSK6tBkfHLbANalDuJ SkQQ== From: Adhemerval Zanella To: libc-alpha@sourceware.org Cc: Alistair Francis , alistair23@gmail.com Subject: [PATCH 4/7] Implement wait in terms of waitpid Date: Thu, 14 Nov 2019 11:47:01 -0300 Message-Id: <20191114144704.19002-4-adhemerval.zanella@linaro.org> In-Reply-To: <20191114144704.19002-1-adhemerval.zanella@linaro.org> References: <20191114144704.19002-1-adhemerval.zanella@linaro.org> The posix implementation is used as default and both bsd and linux version are removed. It simplifies the implementation for architectures that does not provide either __NR_waitpid or __NR_wait4. Checked on x86_64-linux-gnu and powerpc64le-linux-gnu. --- posix/wait.c | 6 +----- sysdeps/posix/wait.c | 30 ----------------------------- sysdeps/unix/bsd/wait.c | 32 ------------------------------- sysdeps/unix/sysv/linux/wait.c | 35 ---------------------------------- 4 files changed, 1 insertion(+), 102 deletions(-) delete mode 100644 sysdeps/posix/wait.c delete mode 100644 sysdeps/unix/bsd/wait.c delete mode 100644 sysdeps/unix/sysv/linux/wait.c diff --git a/posix/wait.c b/posix/wait.c index 0acd1e4926..908e15030a 100644 --- a/posix/wait.c +++ b/posix/wait.c @@ -16,16 +16,12 @@ . */ #include -#include /* Wait for a child to die. When one does, put its status in *STAT_LOC and return its process ID. For errors, return (pid_t) -1. */ __pid_t __wait (int *stat_loc) { - __set_errno (ENOSYS); - return -1; + return __waitpid (WAIT_ANY, (int *) stat_loc, 0); } -stub_warning (wait) - weak_alias (__wait, wait) diff --git a/sysdeps/posix/wait.c b/sysdeps/posix/wait.c deleted file mode 100644 index 573aa47a6d..0000000000 --- a/sysdeps/posix/wait.c +++ /dev/null @@ -1,30 +0,0 @@ -/* Copyright (C) 1991-2019 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 - . */ - -#include - - -/* Wait for a child to die. When one does, put its status in *STAT_LOC - and return its process ID. For errors, return (pid_t) -1. */ -__pid_t -__libc_wait (int *stat_loc) -{ - return __waitpid (WAIT_ANY, (int *) stat_loc, 0); -} - -weak_alias (__libc_wait, __wait) -weak_alias (__libc_wait, wait) diff --git a/sysdeps/unix/bsd/wait.c b/sysdeps/unix/bsd/wait.c deleted file mode 100644 index 3207d96330..0000000000 --- a/sysdeps/unix/bsd/wait.c +++ /dev/null @@ -1,32 +0,0 @@ -/* Copyright (C) 1991-2019 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 - . */ - -#include -#include -#include -#include - -/* Wait for a child to die. When one does, put its status in *STAT_LOC - and return its process ID. For errors, return (pid_t) -1. */ -__pid_t -__libc_wait (int *stat_loc) -{ - return __wait4 (WAIT_ANY, stat_loc, 0, (struct rusage *) NULL); -} - -weak_alias (__libc_wait, __wait) -weak_alias (__libc_wait, wait) diff --git a/sysdeps/unix/sysv/linux/wait.c b/sysdeps/unix/sysv/linux/wait.c deleted file mode 100644 index c2385c752e..0000000000 --- a/sysdeps/unix/sysv/linux/wait.c +++ /dev/null @@ -1,35 +0,0 @@ -/* Copyright (C) 1991-2019 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 - . */ - -#include -#include -#include -#include -#include - -/* Wait for a child to die. When one does, put its status in *STAT_LOC - and return its process ID. For errors, return (pid_t) -1. */ -pid_t -__libc_wait (int *stat_loc) -{ - pid_t result = SYSCALL_CANCEL (wait4, WAIT_ANY, stat_loc, 0, - (struct rusage *) NULL); - return result; -} - -weak_alias (__libc_wait, __wait) -weak_alias (__libc_wait, wait) From patchwork Thu Nov 14 14:47:02 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella Netto X-Patchwork-Id: 1194869 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=libc-alpha-return-107084-incoming=patchwork.ozlabs.org@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.b="IMP7WqK/"; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="dU7fmIAp"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 47DPV92vcQz9s7T for ; Fri, 15 Nov 2019 01:48:01 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:date:message-id:in-reply-to :references; q=dns; s=default; b=xMnWrO27xhg+9/TVErMeOunAd074dGQ ACM06ji9fdBDrNiXRUSoynmyrthiX7dxOjaPwJCzxcUEiO96BxfQL4T113Jwyky9 DwScsRa5je+H7Xps4pZdYKjfwyAhq8FvHF/Lk/MtuBz9uQw8hvrNfbLjU0yxAPV1 Q1Z+1tg0bYQU= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:date:message-id:in-reply-to :references; s=default; bh=cJqLDwiZYe52udIDj+OqMpL0N/0=; b=IMP7W qK/pA4jX4VasP6jWwm3mFbOG3jyhIEhxYpvjuntjOa1wERtmgAzGvFNMVmkaT9qY B9PyIQ++Fv2vhatEi1BbjLRTASB3cMby4P0ybW2Od/pUHW6NOkiBzA9otttJ3H47 o2DQFRCEZgvxi/OqTreGeTxtyZGlsGLpMgZaUc= Received: (qmail 30021 invoked by alias); 14 Nov 2019 14:47:22 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 29961 invoked by uid 89); 14 Nov 2019 14:47:22 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-21.6 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_SHORT, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.1 spammy= X-HELO: mail-qk1-f193.google.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=sBN0cA4LyxPGOCHH5tUTr/M8ODXZLTgrNQdVi5Nk3SU=; b=dU7fmIApcrzVVy86UdDRdBFEzONebVkhHDLQwGX3IWRiQc9sXL8IIcZEuuRJU6Jwvc lJGWyJ/MjHok2iRxLhMyEpM86pfQX+zpLfD2hwApuzze+mulNgyUG9K+9QSZ4RVHkSq5 tCj79sG5UGo+tAyaCdMSGnBhMb5eFK9AraxKTe8W9o9vKQUv2Ihs24M5LKxsbIwlSPc0 GSu29CjYVnUFDljsPvnGKievS6atoSIWla5nGPNR2W9uvRoBwjypkvAIR97fgwL1bPY5 RSTBjy/l+Z39q4ap6A/RgHnJ3N92A2wnuIVXFdR/zZaSX2/UZAAI4/gZ4VzB0YNvXu/2 xSBw== From: Adhemerval Zanella To: libc-alpha@sourceware.org Cc: Alistair Francis , alistair23@gmail.com Subject: [PATCH 5/7] linux: Use waitid on wait4 if __NR_wait4 is not defined Date: Thu, 14 Nov 2019 11:47:02 -0300 Message-Id: <20191114144704.19002-5-adhemerval.zanella@linaro.org> In-Reply-To: <20191114144704.19002-1-adhemerval.zanella@linaro.org> References: <20191114144704.19002-1-adhemerval.zanella@linaro.org> If the wait4 syscall is not avaliable (such as y2038 safe 32-bit systems) waitid should be used instead. However prior Linux 5.4 waitid is not a fully superset of other wait instruction, since it does not include support for waiting for the current process group. It would be possible to emulate to issue an extra syscall to get the current process group, but it is inherent racy: after the current process group is received and before it is passed to waitid a signal could arrive causing the current process group to change So waitid is used if wait4 is not defined iff the build is enabled with a minimum kernel if 5.4+. The new assume __ASSUME_WAITID_PID0_P_PGID is added and an error is issued if waitid can not be implemented by either __NR_wait4 or __NR_waitid && __ASSUME_WAITID_PID0_P_PGID. Checked on x86_64-linux-gnu and i686-linux-gnu. Co-authored-by: Alistair Francis --- sysdeps/unix/sysv/linux/kernel-features.h | 6 ++ sysdeps/unix/sysv/linux/syscalls.list | 1 - sysdeps/unix/sysv/linux/wait4.c | 88 +++++++++++++++++++++++ 3 files changed, 94 insertions(+), 1 deletion(-) create mode 100644 sysdeps/unix/sysv/linux/wait4.c diff --git a/sysdeps/unix/sysv/linux/kernel-features.h b/sysdeps/unix/sysv/linux/kernel-features.h index e6be76ff46..43faaa3f9d 100644 --- a/sysdeps/unix/sysv/linux/kernel-features.h +++ b/sysdeps/unix/sysv/linux/kernel-features.h @@ -208,4 +208,10 @@ # define __ASSUME_TIME64_SYSCALLS 1 #endif +/* Linux waitid prior kernel 5.4 does not support waiting for the current + process group. */ +#if __LINUX_KERNEL_VERSION >= 0x050400 +# define __ASSUME_WAITID_PID0_P_PGID +#endif + #endif /* kernel-features.h */ diff --git a/sysdeps/unix/sysv/linux/syscalls.list b/sysdeps/unix/sysv/linux/syscalls.list index 603e517ca6..5f1352ad43 100644 --- a/sysdeps/unix/sysv/linux/syscalls.list +++ b/sysdeps/unix/sysv/linux/syscalls.list @@ -67,7 +67,6 @@ swapoff - swapoff i:s __swapoff swapoff unshare EXTRA unshare i:i unshare uselib EXTRA uselib i:s __compat_uselib uselib@GLIBC_2.0:GLIBC_2.23 utime - utime i:sP utime -wait4 - wait4 i:iWiP __wait4 wait4 chown - chown i:sii __libc_chown __chown chown diff --git a/sysdeps/unix/sysv/linux/wait4.c b/sysdeps/unix/sysv/linux/wait4.c new file mode 100644 index 0000000000..d09917c7ff --- /dev/null +++ b/sysdeps/unix/sysv/linux/wait4.c @@ -0,0 +1,88 @@ +/* Wait for process to change state. Linux version. + Copyright (C) 2019 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 + . */ + +#include +#include +#include + +pid_t +__wait4 (pid_t pid, int *stat_loc, int options, struct rusage *usage) +{ +#if __NR_wait4 + return SYSCALL_CANCEL (wait4, pid, stat_loc, options, usage); +#elif defined (__ASSUME_WAITID_PID0_P_PGID) + idtype_t idtype = P_PID; + + if (pid < -1) + { + idtype = P_PGID; + pid *= -1; + } + else if (pid == -1) + { + idtype = P_ALL; + } + else if (pid == 0) + { + idtype = P_PGID; + } + + options |= WEXITED; + + siginfo_t infop; + if (SYSCALL_CANCEL (waitid, idtype, pid, &infop, options, usage) < 0) + return -1; + + if (stat_loc) + { + switch (infop.si_code) + { + case CLD_EXITED: + *stat_loc = W_EXITCODE (infop.si_status, 0); + break; + case CLD_DUMPED: + *stat_loc = WCOREFLAG | infop.si_status; + break; + case CLD_KILLED: + *stat_loc = infop.si_status; + break; + case CLD_TRAPPED: + case CLD_STOPPED: + *stat_loc = W_STOPCODE (infop.si_status); + break; + case CLD_CONTINUED: + *stat_loc = __W_CONTINUED; + break; + default: + *stat_loc = 0; + break; + } + } + + return infop.si_pid; +# else +/* Linux waitid prior kernel 5.4 does not support waiting for the current + process. It would be possible to emulate it by calling getpgid for pid 0, + however, it would require an additional syscall and it is inherent racy: + after the current process group is received and before it is passed + to waitid a signal could arrive causing the current process group to + change. */ +# error "The kernel ABI does not provide a way to implement wait4" +#endif +} +weak_alias (__wait4, wait4) From patchwork Thu Nov 14 14:47:03 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella Netto X-Patchwork-Id: 1194870 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=libc-alpha-return-107085-incoming=patchwork.ozlabs.org@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.b="eo4CULt7"; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="tZv5LVwK"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 47DPVM6H3mz9s7T for ; Fri, 15 Nov 2019 01:48:11 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:date:message-id:in-reply-to :references; q=dns; s=default; b=hWTQRV18eUITIbQr9V0FDtI2CxBgEQ4 2lwZ3fwOQQPu/4SGyR1wicZqW4ORmEnxH7HNbLNUhIz5U+WQryODv1b6ugA5cHj/ ljo73td11zcw/MFuKmXPLKb5C1JNfdDc5mV+Ncida63Ayi+DLJlcUCt+hfRLanxC y7NOhcYA/kG4= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:date:message-id:in-reply-to :references; s=default; bh=Dn9eYNnuHmlapC9APCFL3T631Ek=; b=eo4CU Lt7qKw7wxQ2Eil883eE0R6T7Yos0E5pHgMfb+dL6QpBNRe9VXL21Wt2bOOPGcj2B iOqYdNbXbBp+FaM7xljR8PXCQXx5Hxl2WkV/5D+YDfN+090aPueZ3i3RuUGyhcZ2 DgtluMVaCESUG/pWvll5H4xerdJtElNdYxLe+c= Received: (qmail 30173 invoked by alias); 14 Nov 2019 14:47:23 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 30086 invoked by uid 89); 14 Nov 2019 14:47:23 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-21.4 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_NUMSUBJECT, KAM_SHORT, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.1 spammy= X-HELO: mail-qt1-f195.google.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=H4v64pG13DBzvoI8jjVF2zcWNVeJEMz/NHYANkY1GU4=; b=tZv5LVwKElTTnghkDW5lG4oQ4skQqAsMXdQSgV9VhCIvhwxXUPyTR1fzeFXkHsh3MY LpkX04r9SsnK3/l9tKuypPxZD6841GkBLzP2WbXlNQu9FqPJmpyRQKgS5hUUYM3Uwxvb XBOHMvcE+DbvTF6muDssvE9x3I8n6tmmaCUQLWS2dFBh6lKXWjOF0YJvBqUf2fFL0xPo Dj9ttBM6PXFXbouGu1yNhAtbvMpQ2U3yMxY/biTsN+AsJjN6LazphuVpZAKZPDhJsTj9 HmqkYcQ0n8/pQWBzmobdPPddzR08tmIWiCs1ZQgvtThjm6Bif6O9EP7ProNPmlsFYHdH oLsg== From: Adhemerval Zanella To: libc-alpha@sourceware.org Cc: Alistair Francis , alistair23@gmail.com Subject: [PATCH 6/7] Implement waitpid in terms of wait4 Date: Thu, 14 Nov 2019 11:47:03 -0300 Message-Id: <20191114144704.19002-6-adhemerval.zanella@linaro.org> In-Reply-To: <20191114144704.19002-1-adhemerval.zanella@linaro.org> References: <20191114144704.19002-1-adhemerval.zanella@linaro.org> This also consolidate all waitpid implementations. Checked on x86_64-linux-gnu. --- include/sys/wait.h | 1 + posix/wait4.c | 2 +- posix/waitpid.c | 34 ++++++------------------- sysdeps/mach/hurd/wait4.c | 2 +- sysdeps/unix/bsd/waitpid.c | 42 ------------------------------- sysdeps/unix/sysv/linux/wait4.c | 1 + sysdeps/unix/sysv/linux/waitpid.c | 34 ------------------------- 7 files changed, 11 insertions(+), 105 deletions(-) delete mode 100644 sysdeps/unix/bsd/waitpid.c delete mode 100644 sysdeps/unix/sysv/linux/waitpid.c diff --git a/include/sys/wait.h b/include/sys/wait.h index 5ac9cd6ca6..39a327f6b2 100644 --- a/include/sys/wait.h +++ b/include/sys/wait.h @@ -15,5 +15,6 @@ extern __pid_t __wait3 (int *__stat_loc, extern __pid_t __wait4 (__pid_t __pid, int *__stat_loc, int __options, struct rusage *__usage) attribute_hidden; +libc_hidden_proto (__wait4); #endif #endif diff --git a/posix/wait4.c b/posix/wait4.c index eb4f7fb6de..5857b4e7c1 100644 --- a/posix/wait4.c +++ b/posix/wait4.c @@ -26,5 +26,5 @@ __wait4 (__pid_t pid, int *stat_loc, int options, struct rusage *usage) return (pid_t) -1; } stub_warning (wait4) - +libc_hidden_def (__wait4) weak_alias (__wait4, wait4) diff --git a/posix/waitpid.c b/posix/waitpid.c index adae03918a..0490c37316 100644 --- a/posix/waitpid.c +++ b/posix/waitpid.c @@ -1,4 +1,5 @@ -/* Copyright (C) 1991-2019 Free Software Foundation, Inc. +/* Wait for process to change state. + Copyright (C) 1991-2019 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 @@ -16,35 +17,14 @@ . */ #include +#include +#include #include -#include - -/* Wait for a child matching PID to die. - If PID is greater than 0, match any process whose process ID is PID. - If PID is (pid_t) -1, match any process. - If PID is (pid_t) 0, match any process with the - same process group as the current process. - If PID is less than -1, match any process whose - process group is the absolute value of PID. - If the WNOHANG bit is set in OPTIONS, and that child - is not already dead, return (pid_t) 0. If successful, - return PID and store the dead child's status in STAT_LOC. - Return (pid_t) -1 for errors. If the WUNTRACED bit is set in OPTIONS, - return status for stopped children; otherwise don't. */ -pid_t -__waitpid (pid_t pid, int *stat_loc, int options) +__pid_t +__waitpid (__pid_t pid, int *stat_loc, int options) { - if ((options & ~(WNOHANG|WUNTRACED)) != 0) - { - __set_errno (EINVAL); - return (pid_t) -1; - } - - __set_errno (ENOSYS); - return (pid_t) -1; + return __wait4 (pid, stat_loc, options, NULL); } libc_hidden_def (__waitpid) weak_alias (__waitpid, waitpid) - -stub_warning (waitpid) diff --git a/sysdeps/mach/hurd/wait4.c b/sysdeps/mach/hurd/wait4.c index 78ad33e8f5..a0137482c4 100644 --- a/sysdeps/mach/hurd/wait4.c +++ b/sysdeps/mach/hurd/wait4.c @@ -49,5 +49,5 @@ __wait4 (pid_t pid, int *stat_loc, int options, struct rusage *usage) return (pid_t) __hurd_fail (err); } } - +libc_hidden_def (__wait4) weak_alias (__wait4, wait4) diff --git a/sysdeps/unix/bsd/waitpid.c b/sysdeps/unix/bsd/waitpid.c deleted file mode 100644 index 679d45d3dd..0000000000 --- a/sysdeps/unix/bsd/waitpid.c +++ /dev/null @@ -1,42 +0,0 @@ -/* Copyright (C) 1991-2019 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 - . */ - -#include -#include -#include -#include - -/* Wait for a child matching PID to die. - If PID is greater than 0, match any process whose process ID is PID. - If PID is (pid_t) -1, match any process. - If PID is (pid_t) 0, match any process with the - same process group as the current process. - If PID is less than -1, match any process whose - process group is the absolute value of PID. - If the WNOHANG bit is set in OPTIONS, and that child - is not already dead, return (pid_t) 0. If successful, - return PID and store the dead child's status in STAT_LOC. - Return (pid_t) -1 for errors. If the WUNTRACED bit is set in OPTIONS, - return status for stopped children; otherwise don't. */ -pid_t -__waitpid (pid_t pid, int *stat_loc, int options) -{ - return __wait4 (pid, stat_loc, options, NULL); -} - -libc_hidden_def (__waitpid) -weak_alias (__waitpid, waitpid) diff --git a/sysdeps/unix/sysv/linux/wait4.c b/sysdeps/unix/sysv/linux/wait4.c index d09917c7ff..203deb7730 100644 --- a/sysdeps/unix/sysv/linux/wait4.c +++ b/sysdeps/unix/sysv/linux/wait4.c @@ -85,4 +85,5 @@ __wait4 (pid_t pid, int *stat_loc, int options, struct rusage *usage) # error "The kernel ABI does not provide a way to implement wait4" #endif } +libc_hidden_def (__wait4); weak_alias (__wait4, wait4) diff --git a/sysdeps/unix/sysv/linux/waitpid.c b/sysdeps/unix/sysv/linux/waitpid.c deleted file mode 100644 index d35aac01bc..0000000000 --- a/sysdeps/unix/sysv/linux/waitpid.c +++ /dev/null @@ -1,34 +0,0 @@ -/* Linux waitpid syscall implementation. - Copyright (C) 1991-2019 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 - . */ - -#include -#include -#include -#include - -__pid_t -__waitpid (__pid_t pid, int *stat_loc, int options) -{ -#ifdef __NR_waitpid - return SYSCALL_CANCEL (waitpid, pid, stat_loc, options); -#else - return SYSCALL_CANCEL (wait4, pid, stat_loc, options, NULL); -#endif -} -libc_hidden_def (__waitpid) -weak_alias (__waitpid, waitpid) From patchwork Thu Nov 14 14:47:04 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella Netto X-Patchwork-Id: 1194871 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=libc-alpha-return-107086-incoming=patchwork.ozlabs.org@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.b="Qx+BjdGE"; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="JWDEMBdS"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 47DPVd5XCgz9s7T for ; Fri, 15 Nov 2019 01:48:25 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:date:message-id:in-reply-to :references; q=dns; s=default; b=eoRR3frPyNKHbMBrmtmkQOMRiORR9NW BbbwFaKU8qYbO6mylgYC3UTdnpQ3w99le9RcJsp+W1uURFZ/rtYnGWOJ0t3ay/jx m+GJxX1T/OFxpu0tJfo6H50wjQhkLBhkhoHxHh3bf8FVdvUPtytnWrrHk6rb7JIc o8q+1BgoddUw= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:date:message-id:in-reply-to :references; s=default; bh=irPm7GXNBq++uUv77uuBCyFDVZI=; b=Qx+Bj dGE202+ID0ZQz1wDTBqM1LqmuU3lEDhE/0bjdz6lVusOAcIH/lWcGBiqPKC57vA2 eBxxC6ATni63WI50mdXQ5GKWpvItAY9NtuYIsr28ghxx+qUGIZpiN08kVrd1Ks95 4znzbnE7VCpoUYpzMIIEOj9ozVCFHZxQoJSWxs= Received: (qmail 30373 invoked by alias); 14 Nov 2019 14:47:24 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 30327 invoked by uid 89); 14 Nov 2019 14:47:24 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-21.7 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_SHORT, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.1 spammy= X-HELO: mail-qk1-f196.google.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=iinejSlIt8VuF0soYcV/L+80DhRPCWRE4jMj3imRgUs=; b=JWDEMBdStWjyAQAbGZHxN1fL60RkZt9sLj8uSUfwmvbZvxL1f9UAuQ5v3i+ruvZxTW 50Wl23AoBIKctlSr1TvUqdINFb0BYgW8t1G+u0R7sH/CHvYESihHNNNtGci3DjAfa21D 6MAqZyxyk4PYLr1PcjAsasdqswAEQwIjXO9al9T3bAJZ6Ut1x8oqYwFcszpbswo1MALU SC9ZYFBGb+gD6NDzq3Wai1UAKpr+c+LD5t+k8C07FkFtd+A3WlTe5Jffrvo493QPprZp zSBV+yrYfrM0TjQ6h80tjPerg7dBwRY7jqQMGobA+UlUm9IuHeMuazATG5lVTIrmO3T+ c3hg== From: Adhemerval Zanella To: libc-alpha@sourceware.org Cc: Alistair Francis , alistair23@gmail.com Subject: [PATCH 7/7] Consolidate wait3 implementations Date: Thu, 14 Nov 2019 11:47:04 -0300 Message-Id: <20191114144704.19002-7-adhemerval.zanella@linaro.org> In-Reply-To: <20191114144704.19002-1-adhemerval.zanella@linaro.org> References: <20191114144704.19002-1-adhemerval.zanella@linaro.org> The generic one calls wait4. Checked on x86_64-linux-gnu. --- posix/wait3.c | 14 +++--------- sysdeps/posix/wait3.c | 39 --------------------------------- sysdeps/unix/bsd/wait3.c | 33 ---------------------------- sysdeps/unix/sysv/linux/wait3.c | 1 - 4 files changed, 3 insertions(+), 84 deletions(-) delete mode 100644 sysdeps/posix/wait3.c delete mode 100644 sysdeps/unix/bsd/wait3.c delete mode 100644 sysdeps/unix/sysv/linux/wait3.c diff --git a/posix/wait3.c b/posix/wait3.c index 6b6e3a500d..f0abf24e31 100644 --- a/posix/wait3.c +++ b/posix/wait3.c @@ -1,4 +1,5 @@ -/* Copyright (C) 1991-2019 Free Software Foundation, Inc. +/* Wait for process to change state. + Copyright (C) 1991-2019 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 @@ -15,7 +16,6 @@ License along with the GNU C Library; if not, see . */ -#include #include #include @@ -27,15 +27,7 @@ pid_t __wait3 (int *stat_loc, int options, struct rusage *usage) { - if ((options & ~(WNOHANG|WUNTRACED)) != 0) - { - __set_errno (EINVAL); - return (pid_t) -1; - } - - __set_errno (ENOSYS); - return (pid_t) -1; + return __wait4 (WAIT_ANY, stat_loc, options, usage); } -stub_warning (wait3) weak_alias (__wait3, wait3) diff --git a/sysdeps/posix/wait3.c b/sysdeps/posix/wait3.c deleted file mode 100644 index daba36c6dc..0000000000 --- a/sysdeps/posix/wait3.c +++ /dev/null @@ -1,39 +0,0 @@ -/* Copyright (C) 1992-2019 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 - . */ - -#include -#include -#include -#include - -/* Wait for a child to exit. When one does, put its status in *STAT_LOC and - return its process ID. For errors return (pid_t) -1. If USAGE is not nil, - store information about the child's resource usage (as a `struct rusage') - there. If the WUNTRACED bit is set in OPTIONS, return status for stopped - children; otherwise don't. */ -pid_t -__wait3 (int *stat_loc, int options, struct rusage *usage) -{ - if (usage != NULL) - { - __set_errno (ENOSYS); - return (pid_t) -1; - } - return __waitpid (WAIT_ANY, stat_loc, options); -} - -weak_alias (__wait3, wait3) diff --git a/sysdeps/unix/bsd/wait3.c b/sysdeps/unix/bsd/wait3.c deleted file mode 100644 index d7fa7e4496..0000000000 --- a/sysdeps/unix/bsd/wait3.c +++ /dev/null @@ -1,33 +0,0 @@ -/* Copyright (C) 1991-2019 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 - . */ - -#include -#include -#include - -/* Wait for a child to exit. When one does, put its status in *STAT_LOC and - return its process ID. For errors return (pid_t) -1. If USAGE is not nil, - store information about the child's resource usage (as a `struct rusage') - there. If the WUNTRACED bit is set in OPTIONS, return status for stopped - children; otherwise don't. */ -pid_t -__wait3 (int *stat_loc, int options, struct rusage *usage) -{ - return __wait4 (WAIT_ANY, stat_loc, options, usage); -} - -weak_alias (__wait3, wait3) diff --git a/sysdeps/unix/sysv/linux/wait3.c b/sysdeps/unix/sysv/linux/wait3.c deleted file mode 100644 index 2ff027f0e1..0000000000 --- a/sysdeps/unix/sysv/linux/wait3.c +++ /dev/null @@ -1 +0,0 @@ -#include