1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-12-24 17:51:17 +03:00

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>
This commit is contained in:
Lukasz Majewski
2020-01-06 13:52:00 +01:00
parent eae2243272
commit b112f53e9d
3 changed files with 80 additions and 1 deletions

View File

@@ -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.