From patchwork Fri Oct 13 18:27:21 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yury Norov X-Patchwork-Id: 825681 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=sourceware.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=libc-alpha-return-85802-incoming=patchwork.ozlabs.org@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.b="RrKGgLdi"; 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 3yDGRR4ld5z9t2S for ; Sat, 14 Oct 2017 05:27:47 +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 :mime-version:content-type; q=dns; s=default; b=R+c0Nqy0umXeae4I cZpaqU9yiNlK0ItdYKPunUFWj/joLp4ZZwjZE2F6btUUEjw3SldB1rxV6Mw3+Cm0 a4NWftBFcRFZf2QQp3VGFMay4391ly/BYC3cCKND5Q62kfdpGGGYzmgRwg5J5ssa M2q+/KOHZuhC5Y6Wfk8xYEkYLmo= 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 :mime-version:content-type; s=default; bh=UnZh2mI45AGYYL2AFupkAT g9csA=; b=RrKGgLdiKC6fZptdeFHpc3qpDg3nt95SZmI4xRkn3huW+iP2NZnCK8 hqqq/WE5W+N6tbGCmwB40SA3MKxTjmJ8AcOl3WoEhzMkb8K7d0lmakLAzdRFbKDD qMQis342hg1AyavgnDLPQNzcblPsrGldAbbLC4Yb4WGQweNsYbhd4= Received: (qmail 109169 invoked by alias); 13 Oct 2017 18:27:41 -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 109140 invoked by uid 89); 13 Oct 2017 18:27:40 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-26.1 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_ASCII_DIVIDERS, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=H*r:104.47.32, SET, H*r:sk:NAM01-S, blocked X-HELO: NAM01-SN1-obe.outbound.protection.outlook.com Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Yuri.Norov@cavium.com; From: Yury Norov To: libc-alpha@sourceware.org Cc: Adhemerval Zanella , Yury Norov Subject: [PATCH] Consolidate Linux sigpending() implementation Date: Fri, 13 Oct 2017 21:27:21 +0300 Message-Id: <20171013182721.24430-1-ynorov@caviumnetworks.com> MIME-Version: 1.0 X-ClientProxiedBy: VI1P189CA0018.EURP189.PROD.OUTLOOK.COM (2603:10a6:802:2a::31) To CY4PR0701MB3827.namprd07.prod.outlook.com (2603:10b6:910:94::33) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 92cc31f5-db54-4fce-7736-08d51268137a X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254152)(2017052603199)(201703131423075)(201703031133081)(201702281549075); SRVR:CY4PR0701MB3827; X-Microsoft-Exchange-Diagnostics: 1; CY4PR0701MB3827; 3:ebeFSGwIfMmgtRhjLva9yWTvEiO0Cotg6uc6THugBmbeY1dkJ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pQwiMA/7GpaTgtXeQoooH8IwW3Bew8Ur21wn6Bq3Boxmj9j1qKlONAG6DN0g02MOpoY3M4uhi1QMQFZt03y7NGN8CoGb0GVDCw5ux0Hls6tHMw3QGi9xRakNd7OWRdgFR3o0PGygAgu6ZCpVKTzDagN4mODwEThNxdJrCfbZ4t+mz2vznwbagr3PoAHCy2wdeQd0ExMOskXKpoDVsA6l+GiilfKQuYlqQoOaJvVPBh6mJp2EuH3FL5ULWNMFR0SYiuU6/sV8YPGXtRqneIlVbZQY2l+1f9eaL4NAnixAjKfwiDfp5uIyz44pET6fnz6D/RXkDC5gKnkBL6So70X8a+zqLIfxMnRinbbdt63u9E6eFB2a7Tru2TJiE+lgMAe5bvdee7iOSYl+AGH8rX6Kiz/AKo7pFkE= X-Exchange-Antispam-Report-Test: UriScan:(250305191791016)(22074186197030); X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(8121501046)(5005006)(10201501046)(3002001)(100000703101)(100105400095)(93006095)(6041248)(20161123555025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123564025)(20161123560025)(20161123558100)(20161123562025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:CY4PR0701MB3827; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:CY4PR0701MB3827; X-Microsoft-Exchange-Diagnostics: 1; CY4PR0701MB3827; 4:4dbfK7lFPn4Wk5Fg8gnw/r9r1X6BB4K/Sjb0W4uTfEV8PnvpWXjSUS8lhA742J3gyPAGMzqlijtjH6Z+IxTsRFCWmG68Yxd/fAssbg7dh00SEAPeXvc6rRHNh1rih+Ah2DutObNPYNbJnwWl8c+S3xYnoenNP+QaobdO+ReYskNsBBFnVZ9Q5W/yke1FoXSTKwRpZgY+CGTQ5/DZqmipAW0tHDfLx+BNliztYo7jSdPs5NSXDD+huGZ69C7MP5xP+B/Ay+Xz81StqCzhMV37PPcn6ZEdID8WWy7kZ4beRaJXAmrGMjNWNGxxD3VMiatFCjYdWovh6BWOPgu46COrhw== X-Forefront-PRVS: 04599F3534 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6009001)(6069001)(346002)(376002)(189002)(199003)(6116002)(6666003)(8936002)(7736002)(101416001)(47776003)(16586007)(3846002)(316002)(36756003)(305945005)(6486002)(8676002)(42882006)(6916009)(16526018)(50226002)(81166006)(81156014)(66066001)(97736004)(5660300001)(50986999)(478600001)(72206003)(1076002)(68736007)(5003940100001)(4326008)(54906003)(2906002)(25786009)(105586002)(6496005)(107886003)(76506005)(2361001)(6306002)(50466002)(2351001)(53936002)(189998001)(33646002)(48376002)(106356001)(2004002)(21314002); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR0701MB3827; H:localhost; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: 1; CY4PR0701MB3827; 23:VIo/oG3D3Nu9X9rV2c0KT9hxdaKiX+ItJ4mIWwk1ANSTfA0LeIdS9XT1V5EUDCN7OSfBOF3XC+ss15cPr7PUjjkll/AshUtkhC5xRgVtyKd2OG+w8xVP2H+FmXffKu+A2REm3YpCzg+r2I+Vo9KP0l2qLl8lIYTm3ldx3XG3MrFca3madPz33SwCyQqwEt2rvTfSP2ZOv7oAYqByrbGshigf2+RS68KT0fa75NWnIwwQcRiEyrwpZnu6AbHXU6j8fB6WyKCnaevzyS8lGs7dKMbHa+QBeWjUwCLJ4IPR8Alqgy2Q0bKI98eV17UvxwdF+0H9riCio4F6Ao26h9/VIQM+CBqdVJmN60u7coQojqN1E+XLqSPHRCnnoPwpG6o41g0aMKucMTJMS4VeRkWtiXiaCzO5gZ234Gd/N/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sA5k9EUe1I9O/t0J49RWzT01GsWClKsYBTqPz2+IAyUNm/p4h+4FC6N5dRr8v/TKoVNLsT3Qr+VN3JmaKO69Pge3tv7BVZaKEq6reyEx0EMTAT8LzhuN0fF5CBeYOww==; 5:ddz+r2Equ7NNTl4q+AH8TKN6F2FZCGVUmJ4cW8tFIPXbyETBrgzuvxgD0O6BVLeVPxeMdbOaipg7eA/idIHS2jlXsj0VkK0c2wqgm9EJHPsDSpLS9QUGeooLfoBrT/YYeY/EFo//AyuQJ7VAubQVOw==; 24:V4RyhNt/cTEVfvUy7SeoW+O+b1XOVMSxECuhe/rmKecuFYuqaiu6M7e3Nd6uiOnqkxQfXI7nKBx1CfO+iCVckHzzd6l7l4ulcD7wuYQW14c=; 7:JQdz6uZijOMwhC4TehPTz1A/gZkNUZjxO6W3hdYSe2oPSxE+IzBD6D1WF1r07cRwQ0lGuRrTqjn7FMfVbLyveCxcYdQaSlD08v3GKxGjABmXVgIcAyAY/Qv9uiDcES4XJ9qTkfbpIshD7EycLkhXUcfqiH9jw1DI/seL4KunwuDOfkmBYF3gOCHjGa6EdQn3pZpOXY8CvsIhgHAC/6F1cHRKyRQZ2p1q8Q5cKMM4L7A= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Oct 2017 18:27:34.8141 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR0701MB3827 ia64, s390-64, sparc64 and x86_64 host their own implementation of sigpending() in corresponding files, but they are identical to generic linux file despite few comments. This patch removes that files, so the implementation of sigpending() is taken from sysdeps/unix/sysv/linux for all ports. Build-tested on x86_64. * sysdeps/unix/sysv/linux/ia64/sigpending.c: Remove file; * sysdeps/unix/sysv/linux/s390/s390-64/sigpending.c: Likewise; * sysdeps/unix/sysv/linux/sparc/sparc64/sigpending.c: Likewise; * sysdeps/unix/sysv/linux/x86_64/sigpending.c: Likewise. --- sysdeps/unix/sysv/linux/ia64/sigpending.c | 36 ---------------------- sysdeps/unix/sysv/linux/s390/s390-64/sigpending.c | 36 ---------------------- sysdeps/unix/sysv/linux/sparc/sparc64/sigpending.c | 33 -------------------- sysdeps/unix/sysv/linux/x86_64/sigpending.c | 36 ---------------------- 4 files changed, 141 deletions(-) delete mode 100644 sysdeps/unix/sysv/linux/ia64/sigpending.c delete mode 100644 sysdeps/unix/sysv/linux/s390/s390-64/sigpending.c delete mode 100644 sysdeps/unix/sysv/linux/sparc/sparc64/sigpending.c delete mode 100644 sysdeps/unix/sysv/linux/x86_64/sigpending.c diff --git a/sysdeps/unix/sysv/linux/ia64/sigpending.c b/sysdeps/unix/sysv/linux/ia64/sigpending.c deleted file mode 100644 index b1653231de..0000000000 --- a/sysdeps/unix/sysv/linux/ia64/sigpending.c +++ /dev/null @@ -1,36 +0,0 @@ -/* Copyright (C) 1997-2017 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 - . */ - -/* Linux/ia64 only has rt signals, thus we do not even want to try falling - back to the old style signals as the default Linux handler does. */ - -#include -#include -#include - -#include -#include - -/* Change the set of blocked signals to SET, - wait until a signal arrives, and restore the set of blocked signals. */ -int -sigpending (sigset_t *set) -{ - /* XXX The size argument hopefully will have to be changed to the - real size of the user-level sigset_t. */ - return INLINE_SYSCALL (rt_sigpending, 2, set, _NSIG / 8); -} diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/sigpending.c b/sysdeps/unix/sysv/linux/s390/s390-64/sigpending.c deleted file mode 100644 index daf8cfd1b8..0000000000 --- a/sysdeps/unix/sysv/linux/s390/s390-64/sigpending.c +++ /dev/null @@ -1,36 +0,0 @@ -/* Copyright (C) 2001-2017 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 - . */ - -/* 64 bit Linux for S/390 only has rt signals, thus we do not even want to try - falling back to the old style signals as the default Linux handler does. */ - -#include -#include -#include - -#include -#include - -/* Change the set of blocked signals to SET, - wait until a signal arrives, and restore the set of blocked signals. */ -int -sigpending (sigset_t *set) -{ - /* XXX The size argument hopefully will have to be changed to the - real size of the user-level sigset_t. */ - return INLINE_SYSCALL (rt_sigpending, 2, set, _NSIG / 8); -} diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/sigpending.c b/sysdeps/unix/sysv/linux/sparc/sparc64/sigpending.c deleted file mode 100644 index 7e82927435..0000000000 --- a/sysdeps/unix/sysv/linux/sparc/sparc64/sigpending.c +++ /dev/null @@ -1,33 +0,0 @@ -/* Copyright (C) 1997-2017 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 - -/* Change the set of blocked signals to SET, - wait until a signal arrives, and restore the set of blocked signals. */ -int -sigpending (sigset_t *set) -{ - /* XXX The size argument hopefully will have to be changed to the - real size of the user-level sigset_t. */ - return INLINE_SYSCALL (rt_sigpending, 2, set, _NSIG / 8); -} diff --git a/sysdeps/unix/sysv/linux/x86_64/sigpending.c b/sysdeps/unix/sysv/linux/x86_64/sigpending.c deleted file mode 100644 index 410217ed84..0000000000 --- a/sysdeps/unix/sysv/linux/x86_64/sigpending.c +++ /dev/null @@ -1,36 +0,0 @@ -/* Copyright (C) 1997-2017 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 - . */ - -/* Linux/x86_64 only has rt signals, thus we do not even want to try falling - back to the old style signals as the default Linux handler does. */ - -#include -#include -#include - -#include -#include - -/* Change the set of blocked signals to SET, - wait until a signal arrives, and restore the set of blocked signals. */ -int -sigpending (sigset_t *set) -{ - /* XXX The size argument hopefully will have to be changed to the - real size of the user-level sigset_t. */ - return INLINE_SYSCALL (rt_sigpending, 2, set, _NSIG / 8); -}