From patchwork Tue Jul 7 15:08:24 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lukasz Majewski X-Patchwork-Id: 39941 X-Patchwork-Delegate: l.majewski@majess.pl 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 B02993861899; Tue, 7 Jul 2020 15:09:02 +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 454D93861919 for ; Tue, 7 Jul 2020 15:09:00 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 454D93861919 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 4B1QnR2b8Qz1rxbc; Tue, 7 Jul 2020 17:08:59 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 4B1QnR1GNGz1r574; Tue, 7 Jul 2020 17:08:59 +0200 (CEST) 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 rYrDP8DtHJNr; Tue, 7 Jul 2020 17:08:57 +0200 (CEST) X-Auth-Info: yP6oDefHa2zUb6uovc1ejLcZIXVN/qhiCv9vt3Zb1+M= Received: from localhost.localdomain (85-222-111-42.dynamic.chello.pl [85.222.111.42]) (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, 7 Jul 2020 17:08:57 +0200 (CEST) From: Lukasz Majewski To: Joseph Myers , Paul Eggert , Adhemerval Zanella Subject: [RFC 07/10] y2038: Convert __lll_clocklock_wait function to support 64 bit time Date: Tue, 7 Jul 2020 17:08:24 +0200 Message-Id: <20200707150827.20899-8-lukma@denx.de> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200707150827.20899-1-lukma@denx.de> References: <20200707150827.20899-1-lukma@denx.de> MIME-Version: 1.0 X-Spam-Status: No, score=-20.0 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" Prepare the internal __lll_clocklock_wait function to support 64 bit time on architectures, with __TIMESIZE != 64 and __WORDSIZE == 32 by replacing struct timespec with struct __timespec64 and __clock_gettime with __clock_gettime64. --- nptl/lll_timedlock_wait.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nptl/lll_timedlock_wait.c b/nptl/lll_timedlock_wait.c index eabdca70c8..82cd76e557 100644 --- a/nptl/lll_timedlock_wait.c +++ b/nptl/lll_timedlock_wait.c @@ -26,9 +26,9 @@ int __lll_clocklock_wait (int *futex, int val, clockid_t clockid, - const struct timespec *abstime, int private) + const struct __timespec64 *abstime, int private) { - struct timespec ts, *tsp = NULL; + struct __timespec64 ts, *tsp = NULL; if (abstime != NULL) { @@ -37,7 +37,7 @@ __lll_clocklock_wait (int *futex, int val, clockid_t clockid, return EINVAL; /* Get the current time. This can only fail if clockid is not valid. */ - if (__glibc_unlikely (__clock_gettime (clockid, &ts) != 0)) + if (__glibc_unlikely (__clock_gettime64 (clockid, &ts) != 0)) return EINVAL; /* Compute relative timeout. */