From patchwork Mon Jun 1 14:07:32 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lukasz Majewski X-Patchwork-Id: 39396 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 8D476388C01A; Mon, 1 Jun 2020 14:08:06 +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 E20F53870886 for ; Mon, 1 Jun 2020 14:08:03 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org E20F53870886 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 49bH7l085qz1rwbJ; Mon, 1 Jun 2020 16:08:03 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 49bH7k67fNz1qwwd; Mon, 1 Jun 2020 16:08:02 +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 GK3yqDtKA4-P; Mon, 1 Jun 2020 16:08:01 +0200 (CEST) X-Auth-Info: gN1nXj6WdBXgiLlxZk/ZiRd1jKSCOu9h8FasfIGOC9s= 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:00 +0200 (CEST) From: Lukasz Majewski To: Joseph Myers , Paul Eggert , Adhemerval Zanella Subject: [RFC 04/12] y2038: Rename xclock_gettime to __xclock_gettime Date: Mon, 1 Jun 2020 16:07:32 +0200 Message-Id: <20200601140740.16371-5-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.6 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_gettime 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-rwlock6.c | 10 +++++----- nptl/tst-rwlock7.c | 6 +++--- nptl/tst-rwlock9.c | 4 ++-- nptl/tst-sem5.c | 2 +- support/timespec.h | 4 ++-- support/xclock_gettime.c | 3 +-- support/xtime.h | 5 +++-- sysdeps/pthread/tst-cond11.c | 2 +- sysdeps/pthread/tst-rwlock14.c | 2 +- 9 files changed, 19 insertions(+), 19 deletions(-) diff --git a/nptl/tst-rwlock6.c b/nptl/tst-rwlock6.c index 8714381a16..ade2b3050b 100644 --- a/nptl/tst-rwlock6.c +++ b/nptl/tst-rwlock6.c @@ -60,7 +60,7 @@ tf (void *arg) /* Timeout: 0.3 secs. */ struct timespec ts_start; - xclock_gettime (clockid_for_get, &ts_start); + __xclock_gettime (clockid_for_get, &ts_start); struct timespec ts_timeout = timespec_add (ts_start, __make_timespec (0, 300000000)); @@ -77,7 +77,7 @@ tf (void *arg) TEST_TIMESPEC_NOW_OR_AFTER (CLOCK_REALTIME, ts_timeout); - xclock_gettime (clockid_for_get, &ts_timeout); + __xclock_gettime (clockid_for_get, &ts_timeout); ts_timeout.tv_sec += 10; /* Note that the following operation makes ts invalid. */ ts_timeout.tv_nsec += 1000000000; @@ -117,7 +117,7 @@ do_test_clock (clockid_t clockid, const char *fnname) FAIL_EXIT1 ("round %Zu: rwlockattr_destroy failed\n", cnt); struct timespec ts; - xclock_gettime (clockid_for_get, &ts); + __xclock_gettime (clockid_for_get, &ts); ++ts.tv_sec; /* Get a write lock. */ @@ -130,7 +130,7 @@ do_test_clock (clockid_t clockid, const char *fnname) verbose_printf ("1st %swrlock done\n", fnname); - xclock_gettime (clockid_for_get, &ts); + __xclock_gettime (clockid_for_get, &ts); ++ts.tv_sec; if (clockid == CLOCK_USE_TIMEDLOCK) TEST_COMPARE (pthread_rwlock_timedrdlock (&r, &ts), EDEADLK); @@ -139,7 +139,7 @@ do_test_clock (clockid_t clockid, const char *fnname) verbose_printf ("1st %srdlock done\n", fnname); - xclock_gettime (clockid_for_get, &ts); + __xclock_gettime (clockid_for_get, &ts); ++ts.tv_sec; if (clockid == CLOCK_USE_TIMEDLOCK) TEST_COMPARE (pthread_rwlock_timedwrlock (&r, &ts), EDEADLK); diff --git a/nptl/tst-rwlock7.c b/nptl/tst-rwlock7.c index bdbfb5dac9..7dcb2d17ae 100644 --- a/nptl/tst-rwlock7.c +++ b/nptl/tst-rwlock7.c @@ -59,7 +59,7 @@ tf (void *arg) /* Timeout: 0.3 secs. */ struct timespec ts_start; - xclock_gettime (clockid_for_get, &ts_start); + __xclock_gettime (clockid_for_get, &ts_start); const struct timespec ts_timeout = timespec_add (ts_start, __make_timespec (0, 300000000)); @@ -73,7 +73,7 @@ tf (void *arg) TEST_TIMESPEC_NOW_OR_AFTER (clockid_for_get, ts_timeout); struct timespec ts_invalid; - xclock_gettime (clockid_for_get, &ts_invalid); + __xclock_gettime (clockid_for_get, &ts_invalid); ts_invalid.tv_sec += 10; /* Note that the following operation makes ts invalid. */ ts_invalid.tv_nsec += 1000000000; @@ -113,7 +113,7 @@ do_test_clock (clockid_t clockid, const char *fnname) FAIL_EXIT1 ("round %Zu: rwlockattr_destroy failed\n", cnt); struct timespec ts; - xclock_gettime (clockid_for_get, &ts); + __xclock_gettime (clockid_for_get, &ts); ++ts.tv_sec; diff --git a/nptl/tst-rwlock9.c b/nptl/tst-rwlock9.c index 408bbcdd5d..f35ed6feaa 100644 --- a/nptl/tst-rwlock9.c +++ b/nptl/tst-rwlock9.c @@ -73,7 +73,7 @@ writer_thread (void *arg) int e; do { - xclock_gettime (clockid_for_get, &ts); + __xclock_gettime (clockid_for_get, &ts); ts = timespec_add (ts, timeout); ts = timespec_add (ts, timeout); @@ -120,7 +120,7 @@ reader_thread (void *arg) int e; do { - xclock_gettime (clockid_for_get, &ts); + __xclock_gettime (clockid_for_get, &ts); ts = timespec_add (ts, timeout); diff --git a/nptl/tst-sem5.c b/nptl/tst-sem5.c index 8f5c5b9bb1..611fff3e69 100644 --- a/nptl/tst-sem5.c +++ b/nptl/tst-sem5.c @@ -41,7 +41,7 @@ do_test_clock (clockid_t clockid) TEST_COMPARE (TEMP_FAILURE_RETRY (sem_wait (&s)), 0); /* We wait for half a second. */ - xclock_gettime (clockid_for_get, &ts); + __xclock_gettime (clockid_for_get, &ts); ts = timespec_add (ts, __make_timespec (0, TIMESPEC_HZ/2)); errno = 0; diff --git a/support/timespec.h b/support/timespec.h index dbe12938d8..08df1d473b 100644 --- a/support/timespec.h +++ b/support/timespec.h @@ -57,7 +57,7 @@ void test_timespec_equal_or_after_impl (const char *file, int line, ({ \ struct timespec now; \ const int saved_errno = errno; \ - xclock_gettime ((clockid), &now); \ + __xclock_gettime ((clockid), &now); \ TEST_TIMESPEC_BEFORE ((left), now); \ errno = saved_errno; \ }) @@ -71,7 +71,7 @@ void test_timespec_equal_or_after_impl (const char *file, int line, ({ \ struct timespec now; \ const int saved_errno = errno; \ - xclock_gettime ((clockid), &now); \ + __xclock_gettime ((clockid), &now); \ TEST_TIMESPEC_EQUAL_OR_AFTER (now, (right)); \ errno = saved_errno; \ }) diff --git a/support/xclock_gettime.c b/support/xclock_gettime.c index 47f78016a0..fed397b784 100644 --- a/support/xclock_gettime.c +++ b/support/xclock_gettime.c @@ -21,8 +21,7 @@ #include void -xclock_gettime (clockid_t clockid, - struct timespec *ts) +__xclock_gettime (clockid_t clockid, struct timespec *ts) { const int ret = clock_gettime (clockid, ts); if (ret < 0) diff --git a/support/xtime.h b/support/xtime.h index 65edbb01d3..0912ead0ec 100644 --- a/support/xtime.h +++ b/support/xtime.h @@ -20,13 +20,14 @@ #define SUPPORT_TIME_H #include +#include __BEGIN_DECLS /* The following functions call the corresponding libc functions and terminate the process on error. */ -void xclock_gettime (clockid_t clock, struct timespec *ts); +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. */ @@ -34,7 +35,7 @@ void xclock_gettime (clockid_t clock, struct timespec *ts); static inline struct timespec xclock_now (clockid_t clock) { struct timespec ts; - xclock_gettime (clock, &ts); + __xclock_gettime (clock, &ts); return ts; } diff --git a/sysdeps/pthread/tst-cond11.c b/sysdeps/pthread/tst-cond11.c index 209e2f0c8d..5d510859a0 100644 --- a/sysdeps/pthread/tst-cond11.c +++ b/sysdeps/pthread/tst-cond11.c @@ -61,7 +61,7 @@ run_test (clockid_t attr_clock, clockid_t wait_clock) TEST_COMPARE (pthread_mutex_lock (&mut), EDEADLK); struct timespec ts_timeout; - xclock_gettime (wait_clock == CLOCK_USE_ATTR_CLOCK ? attr_clock : wait_clock, + __xclock_gettime (wait_clock == CLOCK_USE_ATTR_CLOCK ? attr_clock : wait_clock, &ts_timeout); /* Wait one second. */ diff --git a/sysdeps/pthread/tst-rwlock14.c b/sysdeps/pthread/tst-rwlock14.c index 3583b19e3c..225bfae486 100644 --- a/sysdeps/pthread/tst-rwlock14.c +++ b/sysdeps/pthread/tst-rwlock14.c @@ -52,7 +52,7 @@ do_test (void) { struct timespec ts; - xclock_gettime (CLOCK_REALTIME, &ts); + __xclock_gettime (CLOCK_REALTIME, &ts); xpthread_barrier_init (&b, NULL, 2); pthread_t me = pthread_self ();