From patchwork Tue Dec 1 12:17:27 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lukasz Majewski X-Patchwork-Id: 41244 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 971293944838; Tue, 1 Dec 2020 12:18:14 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-out.m-online.net (mail-out.m-online.net [212.18.0.10]) by sourceware.org (Postfix) with ESMTPS id C89A53940CE5 for ; Tue, 1 Dec 2020 12:18:12 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org C89A53940CE5 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: sourceware.org; spf=none smtp.mailfrom=lukma@denx.de Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 4Clh2W1rBgz1ryXj; Tue, 1 Dec 2020 13:18:11 +0100 (CET) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 4Clh2W0SQWz1qwTb; Tue, 1 Dec 2020 13:18:11 +0100 (CET) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id F6GrH_dX7m-P; Tue, 1 Dec 2020 13:18:09 +0100 (CET) X-Auth-Info: iq0kYqbMUl+L4lLllrLrWagPxdI56voOokIr24azEhM= Received: from localhost.localdomain (89-64-5-98.dynamic.chello.pl [89.64.5.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Tue, 1 Dec 2020 13:18:09 +0100 (CET) From: Lukasz Majewski To: Joseph Myers , Paul Eggert , Adhemerval Zanella Subject: [PATCH 2/2] lowlevellock-futex: Remove not used macros Date: Tue, 1 Dec 2020 13:17:27 +0100 Message-Id: <20201201121727.25155-2-lukma@denx.de> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201201121727.25155-1-lukma@denx.de> References: <20201201121727.25155-1-lukma@denx.de> MIME-Version: 1.0 X-Spam-Status: No, score=-11.1 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, KAM_LAZY_DOMAIN_SECURITY, RCVD_IN_BARRACUDACENTRAL, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Florian Weimer , GNU C Library , Andreas Schwab , Stepan Golosunov , Alistair Francis Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" Following macros: lll_futex_timed_lock_pi, lll_futex_clock_wait_bitset, lll_futex_wait_requeue_pi, lll_futex_timed_wait_requeue_pi are not used anymore so are eligible for removal. Build tests: ./src/scripts/build-many-glibcs.py glibcs Reviewed-by: Adhemerval Zanella Reviewed-by: Alistair Francis --- sysdeps/nptl/lowlevellock-futex.h | 43 ------------------------------- 1 file changed, 43 deletions(-) diff --git a/sysdeps/nptl/lowlevellock-futex.h b/sysdeps/nptl/lowlevellock-futex.h index 2209ca76a1..d09e9a8749 100644 --- a/sysdeps/nptl/lowlevellock-futex.h +++ b/sysdeps/nptl/lowlevellock-futex.h @@ -94,28 +94,6 @@ # define lll_futex_supported_clockid(clockid) \ ((clockid) == CLOCK_REALTIME || (clockid) == CLOCK_MONOTONIC) -/* The kernel currently only supports CLOCK_MONOTONIC or - CLOCK_REALTIME timeouts for FUTEX_WAIT_BITSET. We could attempt to - convert others here but currently do not. */ -# define lll_futex_clock_wait_bitset(futexp, val, clockid, timeout, private) \ - ({ \ - long int __ret; \ - if (lll_futex_supported_clockid (clockid)) \ - { \ - const unsigned int clockbit = \ - (clockid == CLOCK_REALTIME) ? FUTEX_CLOCK_REALTIME : 0; \ - const int op = \ - __lll_private_flag (FUTEX_WAIT_BITSET | clockbit, private); \ - \ - __ret = lll_futex_syscall (6, futexp, op, val, \ - timeout, NULL /* Unused. */, \ - FUTEX_BITSET_MATCH_ANY); \ - } \ - else \ - __ret = -EINVAL; \ - __ret; \ - }) - /* Wake up up to NR waiters on FUTEXP. */ # define lll_futex_wake(futexp, nr, private) \ lll_futex_syscall (4, futexp, \ @@ -138,32 +116,11 @@ FUTEX_OP_CLEAR_WAKE_IF_GT_ONE) -/* Priority Inheritance support. */ -#define lll_futex_timed_lock_pi(futexp, abstime, private) \ - lll_futex_syscall (4, futexp, \ - __lll_private_flag (FUTEX_LOCK_PI, private), \ - 0, abstime) - #define lll_futex_timed_unlock_pi(futexp, private) \ lll_futex_syscall (4, futexp, \ __lll_private_flag (FUTEX_UNLOCK_PI, private), \ 0, 0) -/* Like lll_futex_wait (FUTEXP, VAL, PRIVATE) but with the expectation - that lll_futex_cmp_requeue_pi (FUTEXP, _, _, MUTEX, _, PRIVATE) will - be used to do the wakeup. Confers priority-inheritance behavior on - the waiter. */ -# define lll_futex_wait_requeue_pi(futexp, val, mutex, private) \ - lll_futex_timed_wait_requeue_pi (futexp, val, NULL, 0, mutex, private) - -/* Like lll_futex_wait_requeue_pi, but with a timeout. */ -# define lll_futex_timed_wait_requeue_pi(futexp, val, timeout, clockbit, \ - mutex, private) \ - lll_futex_syscall (5, futexp, \ - __lll_private_flag (FUTEX_WAIT_REQUEUE_PI \ - | (clockbit), private), \ - val, timeout, mutex) - /* Like lll_futex_requeue, but pairs with lll_futex_wait_requeue_pi and inherits priority from the waiter. */ # define lll_futex_cmp_requeue_pi(futexp, nr_wake, nr_move, mutex, \