about summary refs log tree commit diff
path: root/include/time.h
diff options
context:
space:
mode:
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>2020-07-06 16:06:51 -0300
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2020-09-28 16:21:48 -0300
commit2433d39b69743f100f972e7886f91a2e21795ef0 (patch)
tree39497b3a34f148b79e614a1281685339dd5bb0e3 /include/time.h
parent50e19ddfcd49cb9e012a6288881a77a48fb0aeaa (diff)
downloadglibc-2433d39b69743f100f972e7886f91a2e21795ef0.tar.gz
glibc-2433d39b69743f100f972e7886f91a2e21795ef0.tar.xz
glibc-2433d39b69743f100f972e7886f91a2e21795ef0.zip
linux: Add time64 select support
The syscall __NR_pselect6_time64 (32-bit) or __NR_pselect6 (64-bit)
is used as default.  For architectures with __ASSUME_TIME64_SYSCALLS
the 32-bit fallback uses __NR_select/__NR__newselect or __NR_pselect6
(it should cover the microblaze case where older kernels do not
provide __NR_pselect6).

Checked on x86_64-linux-gnu and i686-linux-gnu (on 5.4 and on 4.15
kernel).

Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Diffstat (limited to 'include/time.h')
-rw-r--r--include/time.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/time.h b/include/time.h
index fe4da9ca10..936486e206 100644
--- a/include/time.h
+++ b/include/time.h
@@ -464,6 +464,12 @@ valid_timespec_to_timeval32 (const struct timespec ts)
   return (struct __timeval32) { (time_t) ts.tv_sec, ts.tv_nsec / 1000 };
 }
 
+static inline struct __timeval64
+valid_timespec_to_timeval64 (const struct timespec ts)
+{
+  return (struct __timeval64) { (time_t) ts.tv_sec, ts.tv_nsec / 1000 };
+}
+
 /* Check if a value is in the valid nanoseconds range. Return true if
    it is, false otherwise.  */
 static inline bool