From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS31976 209.132.180.0/23 X-Spam-Status: No, score=-3.9 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 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 dcvr.yhbt.net (Postfix) with ESMTPS id 147471F463 for ; Wed, 18 Dec 2019 15:02:40 +0000 (UTC) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:subject:to:cc:references:from:message-id:date :mime-version:in-reply-to:content-type :content-transfer-encoding; q=dns; s=default; b=Gy6YGDQbqaOdqlfc MwuFxgLy+Nx3w6VeUDcsUhCA6l9hWdjVpPDMgVw7KXlYkDU9D7+vk8Lahnqu8Ehu R8APC2GOtfd7eYbG7Wz1db82mL8bohNLKyK4iO7pxUTLzTXsCKpvBB3rOboQqKAB KBmbhhAdwukvmMjkO9occfA6scg= 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:subject:to:cc:references:from:message-id:date :mime-version:in-reply-to:content-type :content-transfer-encoding; s=default; bh=Lz1R722cewiFMlMrJq5am3 fltgM=; b=b7hq7PJqRuFVvbkfBeken3a/5XXZFJuCERSudJ3yISM9Ej/I34UQJE MU+/YOIaYfHjzGEgrtp7lUSzFrpVONbVEIxKJOY/xxfb5W38vYw7jiHU9boQZLyl OJ/MWhRQY2AqEQsyOZKDcsMX6rCUc08z9Mig6Qfr55kG8LHUy7RjI= Received: (qmail 53583 invoked by alias); 18 Dec 2019 15:02:37 -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 Received: (qmail 53574 invoked by uid 89); 18 Dec 2019 15:02:37 -0000 Authentication-Results: sourceware.org; auth=none X-HELO: mail-pg1-f195.google.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=subject:to:cc:references:from:autocrypt:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=zui1AxQL8vPkrYIo8xoUoaMMQC4rxoC4QWqZBtCaBak=; b=MKEn7tcLj+r3DTZjCjBFxwDZtcPl0bjoJ2rrJ4idLM3xSksozXSFQOB/tjZVG+iLGJ gQ8w+S+fDRootDe28LVTIpGzjNe5bNII2fZ+2fVTrwMHDeSV+/pAYB3aOy/qh8E3dpa3 k1TFu2cwZTAK81DiCC1jkqz+LUFngZGf3Bv8xQwzcwSy2tvzh0ybKWO8KHPX02gWe3N1 UYduztHS1YZWD9uq2UTFJSgnLLNf7eJIPnekoNbGEyCUO1rF05tFsOhMaI1nZggUUE7j Xzk7UVIGU3/MvOtG/qsSROKPCU7CdnPdZWQDR4hBVHy2Rlbahh/2snbzeUHiIFV+kNAw UihA== Subject: Re: [PATCH 16/16] linux: Optimize fallback 32-bit clock_getres To: Andreas Schwab Cc: libc-alpha@sourceware.org References: <20191217214728.2886-1-adhemerval.zanella@linaro.org> <20191217214728.2886-16-adhemerval.zanella@linaro.org> From: Adhemerval Zanella Message-ID: <46b48283-fab6-ffbf-8f83-037981f5e547@linaro.org> Date: Wed, 18 Dec 2019 12:02:30 -0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit On 18/12/2019 05:56, Andreas Schwab wrote: > On Dez 17 2019, Adhemerval Zanella wrote: > >> diff --git a/sysdeps/unix/sysv/linux/clock_getres.c b/sysdeps/unix/sysv/linux/clock_getres.c >> index 3d59f11d71..c1e1cf60c6 100644 >> --- a/sysdeps/unix/sysv/linux/clock_getres.c >> +++ b/sysdeps/unix/sysv/linux/clock_getres.c >> @@ -42,13 +42,21 @@ __clock_getres64 (clockid_t clock_id, struct __timespec64 *res) >> int r; >> /* Old 32-bit ABI with possible 64-bit time_t support. */ >> # ifdef __NR_clock_getres_time64 >> + /* Avoid issue a __NR_clock_getres_time64 syscall on kernels that do not >> + support 64-bit time_t. */ >> + static int time64_support = 1; >> + if (atomic_load_relaxed (&time64_support) == 1) > > Just != 0 should be enough. > > Andreas. > Ack.