summaryrefslogtreecommitdiff
path: root/include/time.h
diff options
context:
space:
mode:
authorLukasz Majewski <lukma@denx.de>2020-01-06 13:52:00 +0100
committerLukasz Majewski <lukma@denx.de>2020-02-02 11:23:50 +0100
commitb112f53e9d0fc85fc68aadd6442b00491d19830b (patch)
tree3174676c17b0cd3cafc4b401318005dac6fe8150 /include/time.h
parenteae22432723b877354291aca4dbbfde5891dad59 (diff)
downloadglibc-b112f53e9d0fc85fc68aadd6442b00491d19830b.tar.gz
y2038: linux: Provide __sched_rr_get_interval64 implementation
This patch replaces auto generated wrapper (as described in sysdeps/unix/sysv/linux/syscalls.list) for sched_rr_get_interval with one which adds extra support for reading 64 bit time values on machines with __TIMESIZE != 64. There is no functional change for architectures already supporting 64 bit time ABI. The sched_rr_get_interval declaration in ./include/sched.h is not followed by corresponding libc_hidden_proto(), so it has been assumed that newly introduced syscall wrapper doesn't require libc_hidden_def() (which has been added by template used with auto generation script). Moreover, the code for building sched_rr_gi.c file is already placed in ./posix/Makefiles, so there was no need to add it elsewhere. Performed tests and validation are the same as for timer_gettime() conversion (sysdeps/unix/sysv/linux/timer_gettime.c). Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Diffstat (limited to 'include/time.h')
-rw-r--r--include/time.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/time.h b/include/time.h
index f23bfea737..558923274a 100644
--- a/include/time.h
+++ b/include/time.h
@@ -203,6 +203,13 @@ libc_hidden_proto (__timer_settime64);
libc_hidden_proto (__timerfd_settime64);
#endif
+#if __TIMESIZE == 64
+# define __sched_rr_get_interval64 __sched_rr_get_interval
+#else
+extern int __sched_rr_get_interval64 (pid_t pid, struct __timespec64 *tp);
+libc_hidden_proto (__sched_rr_get_interval64);
+#endif
+
/* Compute the `struct tm' representation of T,
offset OFFSET seconds east of UTC,
and store year, yday, mon, mday, wday, hour, min, sec into *TP.