diff mbox series

[RFC,07/10] y2038: Convert __lll_clocklock_wait function to support 64 bit time

Message ID 20200707150827.20899-8-lukma@denx.de
State New
Headers show
Series y2038: nptl: futex: Provide support for futex_time64 | expand

Commit Message

Lukasz Majewski July 7, 2020, 3:08 p.m. UTC
Prepare the internal __lll_clocklock_wait function to support 64 bit time
on architectures, with __TIMESIZE != 64 and __WORDSIZE == 32
by replacing struct timespec with struct __timespec64 and __clock_gettime
with __clock_gettime64.
---
 nptl/lll_timedlock_wait.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/nptl/lll_timedlock_wait.c b/nptl/lll_timedlock_wait.c
index eabdca70c8..82cd76e557 100644
--- a/nptl/lll_timedlock_wait.c
+++ b/nptl/lll_timedlock_wait.c
@@ -26,9 +26,9 @@ 
 
 int
 __lll_clocklock_wait (int *futex, int val, clockid_t clockid,
-		      const struct timespec *abstime, int private)
+		      const struct __timespec64 *abstime, int private)
 {
-  struct timespec ts, *tsp = NULL;
+  struct __timespec64 ts, *tsp = NULL;
 
   if (abstime != NULL)
     {
@@ -37,7 +37,7 @@  __lll_clocklock_wait (int *futex, int val, clockid_t clockid,
         return EINVAL;
 
       /* Get the current time. This can only fail if clockid is not valid.  */
-      if (__glibc_unlikely (__clock_gettime (clockid, &ts) != 0))
+      if (__glibc_unlikely (__clock_gettime64 (clockid, &ts) != 0))
         return EINVAL;
 
       /* Compute relative timeout.  */