From patchwork Mon Jun 1 14:07:30 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lukasz Majewski X-Patchwork-Id: 39394 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 18CC5383E800; Mon, 1 Jun 2020 14:08:03 +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 39CD838708E6 for ; Mon, 1 Jun 2020 14:08:01 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 39CD838708E6 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 49bH7f59D0z1rwbB; Mon, 1 Jun 2020 16:07:58 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 49bH7f3fCNz1qwwd; Mon, 1 Jun 2020 16:07:58 +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 eUsplgwtoPMm; Mon, 1 Jun 2020 16:07:56 +0200 (CEST) X-Auth-Info: HQKwYkGilapDvtGRZgMHE/jN+RnbBckTwBPTjVSb+Os= 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; Mon, 1 Jun 2020 16:07:56 +0200 (CEST) From: Lukasz Majewski To: Joseph Myers , Paul Eggert , Adhemerval Zanella Subject: [RFC 02/12] y2038: Rename timespec_compare to __timespec_compare Date: Mon, 1 Jun 2020 16:07:30 +0200 Message-Id: <20200601140740.16371-3-lukma@denx.de> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200601140740.16371-1-lukma@denx.de> References: <20200601140740.16371-1-lukma@denx.de> MIME-Version: 1.0 X-Spam-Status: No, score=-21.8 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 , Alistair Francis Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" As the timespec_compare is used locally in glibc, its name shall begin with "__". This change adds this prefix. Tested with glibc/glibc-many-build --keep failed glibcs --- sysdeps/pthread/posix-timer.h | 2 +- sysdeps/pthread/timer_gettime.c | 2 +- sysdeps/pthread/timer_routines.c | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/sysdeps/pthread/posix-timer.h b/sysdeps/pthread/posix-timer.h index 81fc8a2394..7d9207e23d 100644 --- a/sysdeps/pthread/posix-timer.h +++ b/sysdeps/pthread/posix-timer.h @@ -115,7 +115,7 @@ timer_delref (struct timer_node *timer) /* Timespec helper routines. */ static inline int __attribute ((always_inline)) -timespec_compare (const struct timespec *left, const struct timespec *right) +__timespec_compare (const struct timespec *left, const struct timespec *right) { if (left->tv_sec < right->tv_sec) return -1; diff --git a/sysdeps/pthread/timer_gettime.c b/sysdeps/pthread/timer_gettime.c index 5723e5f818..6cbf87f434 100644 --- a/sysdeps/pthread/timer_gettime.c +++ b/sysdeps/pthread/timer_gettime.c @@ -51,7 +51,7 @@ timer_gettime (timer_t timerid, struct itimerspec *value) if (armed) { __clock_gettime (clock, &now); - if (timespec_compare (&now, &expiry) < 0) + if (__timespec_compare (&now, &expiry) < 0) timespec_sub (&value->it_value, &expiry, &now); else { diff --git a/sysdeps/pthread/timer_routines.c b/sysdeps/pthread/timer_routines.c index 05e83d7d52..be9b09a832 100644 --- a/sysdeps/pthread/timer_routines.c +++ b/sysdeps/pthread/timer_routines.c @@ -383,7 +383,7 @@ thread_func (void *arg) /* If the timer is due or overdue, remove it from the queue. If it's a periodic timer, re-compute its new time and requeue it. Either way, perform the timer expiry. */ - if (timespec_compare (&now, &timer->expirytime) < 0) + if (__timespec_compare (&now, &timer->expirytime) < 0) break; list_unlink_ip (first); @@ -394,7 +394,7 @@ thread_func (void *arg) timer->overrun_count = 0; timespec_add (&timer->expirytime, &timer->expirytime, &timer->value.it_interval); - while (timespec_compare (&timer->expirytime, &now) < 0) + while (__timespec_compare (&timer->expirytime, &now) < 0) { timespec_add (&timer->expirytime, &timer->expirytime, &timer->value.it_interval); @@ -447,7 +447,7 @@ __timer_thread_queue_timer (struct thread_node *thread, { struct timer_node *timer = timer_links2ptr (iter); - if (timespec_compare (&insert->expirytime, &timer->expirytime) < 0) + if (__timespec_compare (&insert->expirytime, &timer->expirytime) < 0) break; athead = 0; }