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 02/12] y2038: Rename timespec_compare to __timespec_compare
Date: Mon,  1 Jun 2020 16:07:30 +0200	[thread overview]
Message-ID: <20200601140740.16371-3-lukma@denx.de> (raw)
In-Reply-To: <20200601140740.16371-1-lukma@denx.de>

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;
     }
-- 
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 ` Lukasz Majewski [this message]
2020-06-01 14:07 ` [RFC 03/12] y2038: Rename make_timespec to __make_timespec Lukasz Majewski
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-3-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).