From patchwork Mon Jun 1 14:07:33 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lukasz Majewski X-Patchwork-Id: 39397 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 E0B81383F878; Mon, 1 Jun 2020 14:08:08 +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.9]) by sourceware.org (Postfix) with ESMTPS id F3A24383F848 for ; Mon, 1 Jun 2020 14:08:05 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org F3A24383F848 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 49bH7n0bLWz1qsbT; Mon, 1 Jun 2020 16:08:05 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 49bH7m6wQYz1qwwd; Mon, 1 Jun 2020 16:08:04 +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 7Jj9A8BF852z; Mon, 1 Jun 2020 16:08:03 +0200 (CEST) X-Auth-Info: kmX6tZpjkYSNzWpKTJq1//usDfiE4toVwTt5P8hL+Po= 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:08:03 +0200 (CEST) From: Lukasz Majewski To: Joseph Myers , Paul Eggert , Adhemerval Zanella Subject: [RFC 05/12] y2038: Rename xclock_now to __xclock_now Date: Mon, 1 Jun 2020 16:07:33 +0200 Message-Id: <20200601140740.16371-6-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.5 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 xclock_now is used locally in glibc, its name shall begin with "__". This change adds this prefix. Tested with glibc/glibc-many-build --keep failed glibcs --- nptl/tst-eintr2.c | 2 +- nptl/tst-eintr5.c | 2 +- support/xtime.h | 2 +- sysdeps/pthread/tst-cond27.c | 2 +- sysdeps/pthread/tst-join3.c | 4 ++-- sysdeps/pthread/tst-join5.c | 6 +++--- sysdeps/pthread/tst-mutex5.c | 6 +++--- sysdeps/pthread/tst-mutex9.c | 2 +- 8 files changed, 13 insertions(+), 13 deletions(-) diff --git a/nptl/tst-eintr2.c b/nptl/tst-eintr2.c index eba8065236..68a8453f34 100644 --- a/nptl/tst-eintr2.c +++ b/nptl/tst-eintr2.c @@ -37,7 +37,7 @@ static pthread_mutex_t m2 = PTHREAD_MUTEX_INITIALIZER; static void * tf1 (void *arg) { - struct timespec ts = timespec_add (xclock_now (CLOCK_REALTIME), + struct timespec ts = timespec_add (__xclock_now (CLOCK_REALTIME), __make_timespec (10000, 0)); /* This call must never return. */ diff --git a/nptl/tst-eintr5.c b/nptl/tst-eintr5.c index 4edfbaaef6..3130f0fa08 100644 --- a/nptl/tst-eintr5.c +++ b/nptl/tst-eintr5.c @@ -38,7 +38,7 @@ static pthread_cond_t c = PTHREAD_COND_INITIALIZER; static void * tf (void *arg) { - struct timespec ts = timespec_add (xclock_now (CLOCK_REALTIME), + struct timespec ts = timespec_add (__xclock_now (CLOCK_REALTIME), __make_timespec (10000, 0)); /* This call must never return. */ diff --git a/support/xtime.h b/support/xtime.h index 0912ead0ec..0fce19a78d 100644 --- a/support/xtime.h +++ b/support/xtime.h @@ -32,7 +32,7 @@ void __xclock_gettime (clockid_t clock, struct timespec *ts); /* This helper can often simplify tests by avoiding an explicit variable declaration or allowing that declaration to be const. */ -static inline struct timespec xclock_now (clockid_t clock) +static inline struct timespec __xclock_now (clockid_t clock) { struct timespec ts; __xclock_gettime (clock, &ts); diff --git a/sysdeps/pthread/tst-cond27.c b/sysdeps/pthread/tst-cond27.c index 3d7b8240b1..5755d25ec8 100644 --- a/sysdeps/pthread/tst-cond27.c +++ b/sysdeps/pthread/tst-cond27.c @@ -40,7 +40,7 @@ do_test_clock (clockid_t clockid) xpthread_mutex_lock (&mut); /* Waiting for the condition will fail. But we want the timeout here. */ - const struct timespec ts_now = xclock_now (clockid); + const struct timespec ts_now = __xclock_now (clockid); const struct timespec ts_timeout = timespec_add (ts_now, __make_timespec (0, 500000000)); diff --git a/sysdeps/pthread/tst-join3.c b/sysdeps/pthread/tst-join3.c index fc54f12cc9..76df44c49e 100644 --- a/sysdeps/pthread/tst-join3.c +++ b/sysdeps/pthread/tst-join3.c @@ -53,7 +53,7 @@ do_test_clock (clockid_t clockid) pthread_t th = xpthread_create (NULL, tf, NULL); void *status; - struct timespec timeout = timespec_add (xclock_now (clockid_for_get), + struct timespec timeout = timespec_add (__xclock_now (clockid_for_get), __make_timespec (0, 200000000)); int val; @@ -68,7 +68,7 @@ do_test_clock (clockid_t clockid) while (1) { - timeout = timespec_add (xclock_now (clockid_for_get), + timeout = timespec_add (__xclock_now (clockid_for_get), __make_timespec (0, 200000000)); if (clockid == CLOCK_USE_TIMEDJOIN) diff --git a/sysdeps/pthread/tst-join5.c b/sysdeps/pthread/tst-join5.c index 525f349a4b..a72760a9ff 100644 --- a/sysdeps/pthread/tst-join5.c +++ b/sysdeps/pthread/tst-join5.c @@ -45,15 +45,15 @@ static int thread_join (pthread_t thread, void **retval) { #if defined USE_PTHREAD_TIMEDJOIN_NP - const struct timespec ts = timespec_add (xclock_now (CLOCK_REALTIME), + const struct timespec ts = timespec_add (__xclock_now (CLOCK_REALTIME), __make_timespec (1000, 0)); return pthread_timedjoin_np (thread, retval, &ts); #elif defined USE_PTHREAD_CLOCKJOIN_NP_REALTIME - const struct timespec ts = timespec_add (xclock_now (CLOCK_REALTIME), + const struct timespec ts = timespec_add (__xclock_now (CLOCK_REALTIME), __make_timespec (1000, 0)); return pthread_clockjoin_np (thread, retval, CLOCK_REALTIME, &ts); #elif defined USE_PTHREAD_CLOCKJOIN_NP_MONOTONIC - const struct timespec ts = timespec_add (xclock_now (CLOCK_MONOTONIC), + const struct timespec ts = timespec_add (__xclock_now (CLOCK_MONOTONIC), __make_timespec (1000, 0)); return pthread_clockjoin_np (thread, retval, CLOCK_MONOTONIC, &ts); #else diff --git a/sysdeps/pthread/tst-mutex5.c b/sysdeps/pthread/tst-mutex5.c index 72fdbdaea5..86f383a193 100644 --- a/sysdeps/pthread/tst-mutex5.c +++ b/sysdeps/pthread/tst-mutex5.c @@ -67,7 +67,7 @@ do_test_clock (clockid_t clockid, const char *fnname) FAIL_EXIT1 ("mutex_trylock succeeded"); /* Wait 2 seconds. */ - struct timespec ts_timeout = timespec_add (xclock_now (clockid_for_get), + struct timespec ts_timeout = timespec_add (__xclock_now (clockid_for_get), __make_timespec (2, 0)); if (clockid == CLOCK_USE_TIMEDLOCK) @@ -86,7 +86,7 @@ do_test_clock (clockid_t clockid, const char *fnname) TEST_COMPARE (pthread_mutex_clocklock (&m, clockid, &ts_timeout), EINVAL); TEST_COMPARE (pthread_mutex_unlock (&m), 0); - const struct timespec ts_start = xclock_now (CLOCK_REALTIME); + const struct timespec ts_start = __xclock_now (CLOCK_REALTIME); /* Wait 2 seconds. */ ts_timeout = timespec_add (ts_start, __make_timespec (2, 0)); @@ -96,7 +96,7 @@ do_test_clock (clockid_t clockid, const char *fnname) else TEST_COMPARE (pthread_mutex_clocklock (&m, clockid, &ts_timeout), 0); - const struct timespec ts_end = xclock_now (clockid_for_get); + const struct timespec ts_end = __xclock_now (clockid_for_get); /* Check that timedlock didn't delay. We use a limit of 0.1 secs. */ TEST_TIMESPEC_BEFORE (ts_end, diff --git a/sysdeps/pthread/tst-mutex9.c b/sysdeps/pthread/tst-mutex9.c index d03a22b97a..20e6d8d009 100644 --- a/sysdeps/pthread/tst-mutex9.c +++ b/sysdeps/pthread/tst-mutex9.c @@ -101,7 +101,7 @@ do_test_clock (clockid_t clockid) if (pthread_mutex_unlock (m) == 0) FAIL_EXIT1 ("child: mutex_unlock succeeded"); - const struct timespec ts = timespec_add (xclock_now (clockid_for_get), + const struct timespec ts = timespec_add (__xclock_now (clockid_for_get), __make_timespec (0, 500000000)); if (clockid == CLOCK_USE_TIMEDLOCK)