public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Lukasz Majewski <lukma@denx.de>
To: Joseph Myers <joseph@codesourcery.com>,
	Paul Eggert <eggert@cs.ucla.edu>,
	Adhemerval Zanella <adhemerval.zanella@linaro.org>
Cc: Alistair Francis <alistair23@gmail.com>,
	Alistair Francis <alistair.francis@wdc.com>,
	GNU C Library <libc-alpha@sourceware.org>,
	Siddhesh Poyarekar <siddhesh@gotplt.org>,
	Florian Weimer <fweimer@redhat.com>,
	Zack Weinberg <zackw@panix.com>,
	Carlos O'Donell <carlos@redhat.com>,
	Andreas Schwab <schwab@suse.de>, Lukasz Majewski <lukma@denx.de>
Subject: [RFC 03/12] y2038: Rename make_timespec to __make_timespec
Date: Mon,  1 Jun 2020 16:07:31 +0200	[thread overview]
Message-ID: <20200601140740.16371-4-lukma@denx.de> (raw)
In-Reply-To: <20200601140740.16371-1-lukma@denx.de>

As the make_timespec 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 +-
 nptl/tst-rwlock6.c           | 2 +-
 nptl/tst-rwlock7.c           | 2 +-
 nptl/tst-sem17.c             | 2 +-
 nptl/tst-sem5.c              | 2 +-
 support/timespec-add.c       | 2 +-
 support/timespec-sub.c       | 2 +-
 support/timespec.h           | 2 +-
 sysdeps/pthread/tst-cond26.c | 2 +-
 sysdeps/pthread/tst-cond27.c | 2 +-
 sysdeps/pthread/tst-join14.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 +-
 16 files changed, 21 insertions(+), 21 deletions(-)

diff --git a/nptl/tst-eintr2.c b/nptl/tst-eintr2.c
index 4f26ccad04..eba8065236 100644
--- a/nptl/tst-eintr2.c
+++ b/nptl/tst-eintr2.c
@@ -38,7 +38,7 @@ static void *
 tf1 (void *arg)
 {
   struct timespec ts = timespec_add (xclock_now (CLOCK_REALTIME),
-                                     make_timespec (10000, 0));
+                                     __make_timespec (10000, 0));
 
   /* This call must never return.  */
   int e = pthread_mutex_timedlock (&m1, &ts);
diff --git a/nptl/tst-eintr5.c b/nptl/tst-eintr5.c
index bc6c0fef53..4edfbaaef6 100644
--- a/nptl/tst-eintr5.c
+++ b/nptl/tst-eintr5.c
@@ -39,7 +39,7 @@ static void *
 tf (void *arg)
 {
   struct timespec ts = timespec_add (xclock_now (CLOCK_REALTIME),
-                                     make_timespec (10000, 0));
+                                     __make_timespec (10000, 0));
 
   /* This call must never return.  */
   TEST_COMPARE (pthread_cond_timedwait (&c, &m, &ts), 0);
diff --git a/nptl/tst-rwlock6.c b/nptl/tst-rwlock6.c
index 36afa22da4..8714381a16 100644
--- a/nptl/tst-rwlock6.c
+++ b/nptl/tst-rwlock6.c
@@ -63,7 +63,7 @@ tf (void *arg)
   xclock_gettime (clockid_for_get, &ts_start);
 
   struct timespec ts_timeout = timespec_add (ts_start,
-                                             make_timespec (0, 300000000));
+                                             __make_timespec (0, 300000000));
 
   verbose_printf ("child calling %srdlock\n", fnname);
 
diff --git a/nptl/tst-rwlock7.c b/nptl/tst-rwlock7.c
index 1dcc4f0425..bdbfb5dac9 100644
--- a/nptl/tst-rwlock7.c
+++ b/nptl/tst-rwlock7.c
@@ -61,7 +61,7 @@ tf (void *arg)
   struct timespec ts_start;
   xclock_gettime (clockid_for_get, &ts_start);
   const struct timespec ts_timeout = timespec_add (ts_start,
-                                                   make_timespec (0, 300000000));
+                                                   __make_timespec (0, 300000000));
 
   if (clockid == CLOCK_USE_TIMEDLOCK)
     TEST_COMPARE (pthread_rwlock_timedwrlock (r, &ts_timeout), ETIMEDOUT);
diff --git a/nptl/tst-sem17.c b/nptl/tst-sem17.c
index 80658b85c7..090e390507 100644
--- a/nptl/tst-sem17.c
+++ b/nptl/tst-sem17.c
@@ -35,7 +35,7 @@ do_test (void)
   sem_t s;
   TEST_COMPARE (sem_init (&s, 0, 1), 0);
 
-  const struct timespec ts = make_timespec (0, 0);
+  const struct timespec ts = __make_timespec (0, 0);
 
   /* These clocks are meaningless to sem_clockwait.  */
 #if defined(CLOCK_PROCESS_CPUTIME_ID)
diff --git a/nptl/tst-sem5.c b/nptl/tst-sem5.c
index 766274e50d..8f5c5b9bb1 100644
--- a/nptl/tst-sem5.c
+++ b/nptl/tst-sem5.c
@@ -42,7 +42,7 @@ do_test_clock (clockid_t clockid)
 
   /* We wait for half a second.  */
   xclock_gettime (clockid_for_get, &ts);
-  ts = timespec_add (ts, make_timespec (0, TIMESPEC_HZ/2));
+  ts = timespec_add (ts, __make_timespec (0, TIMESPEC_HZ/2));
 
   errno = 0;
   TEST_COMPARE (TEMP_FAILURE_RETRY ((clockid == CLOCK_USE_TIMEDWAIT)
diff --git a/support/timespec-add.c b/support/timespec-add.c
index 57bf6682e1..bb22b12e9b 100644
--- a/support/timespec-add.c
+++ b/support/timespec-add.c
@@ -61,5 +61,5 @@ timespec_add (struct timespec a, struct timespec b)
         }
     }
 
-  return make_timespec (rs, rns);
+  return __make_timespec (rs, rns);
 }
diff --git a/support/timespec-sub.c b/support/timespec-sub.c
index a1d1a8df92..535a3b155b 100644
--- a/support/timespec-sub.c
+++ b/support/timespec-sub.c
@@ -61,5 +61,5 @@ timespec_sub (struct timespec a, struct timespec b)
         }
     }
 
-  return make_timespec (rs, rns);
+  return __make_timespec (rs, rns);
 }
diff --git a/support/timespec.h b/support/timespec.h
index c5852dfe75..dbe12938d8 100644
--- a/support/timespec.h
+++ b/support/timespec.h
@@ -30,7 +30,7 @@ struct timespec timespec_sub (struct timespec, struct timespec)
   __attribute__((const));
 
 static inline struct timespec
-make_timespec (time_t s, long int ns)
+__make_timespec (time_t s, long int ns)
 {
   struct timespec r;
   r.tv_sec = s;
diff --git a/sysdeps/pthread/tst-cond26.c b/sysdeps/pthread/tst-cond26.c
index e647da00c2..5caf7aaaa7 100644
--- a/sysdeps/pthread/tst-cond26.c
+++ b/sysdeps/pthread/tst-cond26.c
@@ -36,7 +36,7 @@ do_test (void)
 {
   xpthread_mutex_lock (&mut);
 
-  const struct timespec ts = make_timespec (0, 0);
+  const struct timespec ts = __make_timespec (0, 0);
 
   /* These clocks are meaningless to sem_clockwait.  */
 #if defined(CLOCK_PROCESS_CPUTIME_ID)
diff --git a/sysdeps/pthread/tst-cond27.c b/sysdeps/pthread/tst-cond27.c
index c8142abf9e..3d7b8240b1 100644
--- a/sysdeps/pthread/tst-cond27.c
+++ b/sysdeps/pthread/tst-cond27.c
@@ -42,7 +42,7 @@ do_test_clock (clockid_t clockid)
   /* Waiting for the condition will fail.  But we want the timeout here.  */
   const struct timespec ts_now = xclock_now (clockid);
   const struct timespec ts_timeout =
-    timespec_add (ts_now, make_timespec (0, 500000000));
+    timespec_add (ts_now, __make_timespec (0, 500000000));
 
   /* In theory pthread_cond_clockwait could return zero here due to
      spurious wakeup. However that can't happen without a signal or an
diff --git a/sysdeps/pthread/tst-join14.c b/sysdeps/pthread/tst-join14.c
index 0109324453..092f454449 100644
--- a/sysdeps/pthread/tst-join14.c
+++ b/sysdeps/pthread/tst-join14.c
@@ -34,7 +34,7 @@
 static void *
 tf (void *arg)
 {
-  struct timespec ts = make_timespec(0, 100000);
+  struct timespec ts = __make_timespec(0, 100000);
   nanosleep(&ts, NULL);
 
   return (void *) 42l;
diff --git a/sysdeps/pthread/tst-join3.c b/sysdeps/pthread/tst-join3.c
index ffebcf586f..fc54f12cc9 100644
--- a/sysdeps/pthread/tst-join3.c
+++ b/sysdeps/pthread/tst-join3.c
@@ -54,7 +54,7 @@ do_test_clock (clockid_t clockid)
 
   void *status;
   struct timespec timeout = timespec_add (xclock_now (clockid_for_get),
-                                          make_timespec (0, 200000000));
+                                          __make_timespec (0, 200000000));
 
   int val;
   if (clockid == CLOCK_USE_TIMEDJOIN)
@@ -69,7 +69,7 @@ do_test_clock (clockid_t clockid)
   while (1)
     {
       timeout = timespec_add (xclock_now (clockid_for_get),
-                              make_timespec (0, 200000000));
+                              __make_timespec (0, 200000000));
 
       if (clockid == CLOCK_USE_TIMEDJOIN)
         val = pthread_timedjoin_np (th, &status, &timeout);
diff --git a/sysdeps/pthread/tst-join5.c b/sysdeps/pthread/tst-join5.c
index acdc365c05..525f349a4b 100644
--- a/sysdeps/pthread/tst-join5.c
+++ b/sysdeps/pthread/tst-join5.c
@@ -46,15 +46,15 @@ thread_join (pthread_t thread, void **retval)
 {
 #if defined USE_PTHREAD_TIMEDJOIN_NP
   const struct timespec ts = timespec_add (xclock_now (CLOCK_REALTIME),
-                                           make_timespec (1000, 0));
+                                           __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),
-                                           make_timespec (1000, 0));
+                                           __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),
-                                           make_timespec (1000, 0));
+                                           __make_timespec (1000, 0));
   return pthread_clockjoin_np (thread, retval, CLOCK_MONOTONIC, &ts);
 #else
   return pthread_join (thread, retval);
diff --git a/sysdeps/pthread/tst-mutex5.c b/sysdeps/pthread/tst-mutex5.c
index 14490768c3..72fdbdaea5 100644
--- a/sysdeps/pthread/tst-mutex5.c
+++ b/sysdeps/pthread/tst-mutex5.c
@@ -68,7 +68,7 @@ do_test_clock (clockid_t clockid, const char *fnname)
 
   /* Wait 2 seconds.  */
   struct timespec ts_timeout = timespec_add (xclock_now (clockid_for_get),
-                                             make_timespec (2, 0));
+                                             __make_timespec (2, 0));
 
   if (clockid == CLOCK_USE_TIMEDLOCK)
     TEST_COMPARE (pthread_mutex_timedlock (&m, &ts_timeout), ETIMEDOUT);
@@ -89,7 +89,7 @@ do_test_clock (clockid_t clockid, const char *fnname)
   const struct timespec ts_start = xclock_now (CLOCK_REALTIME);
 
   /* Wait 2 seconds.  */
-  ts_timeout = timespec_add (ts_start, make_timespec (2, 0));
+  ts_timeout = timespec_add (ts_start, __make_timespec (2, 0));
 
   if (clockid == CLOCK_USE_TIMEDLOCK)
     TEST_COMPARE (pthread_mutex_timedlock (&m, &ts_timeout), 0);
@@ -100,7 +100,7 @@ do_test_clock (clockid_t clockid, const char *fnname)
 
   /* Check that timedlock didn't delay.  We use a limit of 0.1 secs.  */
   TEST_TIMESPEC_BEFORE (ts_end,
-                        timespec_add (ts_start, make_timespec (0, 100000000)));
+                        timespec_add (ts_start, __make_timespec (0, 100000000)));
 
   TEST_COMPARE (pthread_mutex_unlock (&m), 0);
   TEST_COMPARE (pthread_mutex_destroy (&m), 0);
diff --git a/sysdeps/pthread/tst-mutex9.c b/sysdeps/pthread/tst-mutex9.c
index 2d7927b7c2..d03a22b97a 100644
--- a/sysdeps/pthread/tst-mutex9.c
+++ b/sysdeps/pthread/tst-mutex9.c
@@ -102,7 +102,7 @@ do_test_clock (clockid_t clockid)
         FAIL_EXIT1 ("child: mutex_unlock succeeded");
 
       const struct timespec ts = timespec_add (xclock_now (clockid_for_get),
-                                               make_timespec (0, 500000000));
+                                               __make_timespec (0, 500000000));
 
       if (clockid == CLOCK_USE_TIMEDLOCK)
         TEST_COMPARE (pthread_mutex_timedlock (m, &ts), ETIMEDOUT);
-- 
2.20.1


  parent reply	other threads:[~2020-06-01 14:08 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-01 14:07 [RFC 00/12] [RFC] y2038: Convert timespec_{sub|add|create} in support to be Y2038 safe Lukasz Majewski
2020-06-01 14:07 ` [RFC 01/12] doc: Fix wording and formattine in ./support/README Lukasz Majewski
2020-06-01 14:07 ` [RFC 02/12] y2038: Rename timespec_compare to __timespec_compare Lukasz Majewski
2020-06-01 14:07 ` Lukasz Majewski [this message]
2020-06-01 14:07 ` [RFC 04/12] y2038: Rename xclock_gettime to __xclock_gettime Lukasz Majewski
2020-06-01 14:07 ` [RFC 05/12] y2038: Rename xclock_now to __xclock_now Lukasz Majewski
2020-06-01 14:07 ` [RFC 06/12] y2038: Rename timespec_sub to __timespec_sub Lukasz Majewski
2020-06-01 14:07 ` [RFC 07/12] y2038: Rename timespec_add to __timespec_add Lukasz Majewski
2020-06-01 14:07 ` [RFC 08/12] y2038: Convert __make_timespec to be Y2038 safe Lukasz Majewski
2020-06-01 14:07 ` [RFC 09/12] y2038: Convert __xclock_gettime " Lukasz Majewski
2020-06-01 14:07 ` [RFC 10/12] y2038: Convert __xclock_now " Lukasz Majewski
2020-06-01 14:07 ` [RFC 11/12] y2038: Convert timespec* files in ./support " Lukasz Majewski
2020-06-01 14:07 ` [RFC 12/12] y2038: Convert timespec_* from posix-timer.h " Lukasz Majewski
2020-06-02 18:05 ` [RFC 00/12] [RFC] y2038: Convert timespec_{sub|add|create} in support " Joseph Myers
2020-06-03 11:42   ` Lukasz Majewski
2020-06-03 12:53 ` [Y2038] Replacement of struct timespec with struct __timespec64 in glibc internal code Lukasz Majewski
2020-06-03 17:28   ` Joseph Myers
2020-06-03 20:45     ` Lukasz Majewski
2020-06-24 12:26     ` Lukasz Majewski
2020-06-24 12:43       ` Andreas Schwab
2020-06-24 20:39         ` Lukasz Majewski
2020-06-24 22:10           ` Joseph Myers
2020-06-24 17:43       ` Joseph Myers
2020-06-08 22:23   ` Samuel Thibault

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200601140740.16371-4-lukma@denx.de \
    --to=lukma@denx.de \
    --cc=adhemerval.zanella@linaro.org \
    --cc=alistair.francis@wdc.com \
    --cc=alistair23@gmail.com \
    --cc=carlos@redhat.com \
    --cc=eggert@cs.ucla.edu \
    --cc=fweimer@redhat.com \
    --cc=joseph@codesourcery.com \
    --cc=libc-alpha@sourceware.org \
    --cc=schwab@suse.de \
    --cc=siddhesh@gotplt.org \
    --cc=zackw@panix.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).