about summary refs log tree commit diff
path: root/include/time.h
diff options
context:
space:
mode:
authorAlbert ARIBAUD (3ADEV) <albert.aribaud@3adev.fr>2017-09-08 00:41:37 +0200
committerAlbert ARIBAUD (3ADEV) <albert.aribaud@3adev.fr>2018-10-24 12:53:27 +0200
commitc0195aeb0591bd575abcbf9382d28d4f2b2956c7 (patch)
tree8e1d72c57f7631bab4d1fa3ac6be42984fd0d30f /include/time.h
parent4b076e9e31c3810928f6b8e4f6d23ec7c1c0f65a (diff)
downloadglibc-c0195aeb0591bd575abcbf9382d28d4f2b2956c7.tar.gz
glibc-c0195aeb0591bd575abcbf9382d28d4f2b2956c7.tar.xz
glibc-c0195aeb0591bd575abcbf9382d28d4f2b2956c7.zip
Y2038: add function __clock_nanosleep64
Linux does not provide a 64-bit-time clock_nanosleep syscall,
so __clock_nanosleep64 is a wrapper calling __clock_nanosleep,
with one conversion before the call and possibly one after.

Note:

There is no point in implementing __clock_nanosleep64 directly
around the 32-bit-time syscall and making __clock_nanosleep a
wrapper around __clock_nanosleep64, because __clock_nanosleep64
would still need one or two conversions, and __clock_nanosleep
would now also need those, adding a cost of 2 to 4 conversions
in the worst case.
Diffstat (limited to 'include/time.h')
-rw-r--r--include/time.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/time.h b/include/time.h
index f24ae1992d..2bfba396fe 100644
--- a/include/time.h
+++ b/include/time.h
@@ -46,6 +46,9 @@ extern int __clock_settime64 (clockid_t __clock_id,
 			       const struct __timespec64 *__tp) __THROW;
 extern int __clock_getres_time64 (clockid_t __clock_id,
 				  struct __timespec64 *__res) __THROW;
+extern int __clock_nanosleep64 (clockid_t __clock_id, int __flags,
+				const struct __timespec64 *__req,
+				struct __timespec64 *__rem);
 
 /* Now define the internal interfaces.  */
 struct tm;