]> sourceware.org Git - glibc.git/commit
linux: Use long time_t for wait4/getrusage
authorAlistair Francis <alistair.francis@wdc.com>
Mon, 23 Dec 2019 21:26:50 +0000 (13:26 -0800)
committerAlistair Francis <alistair.francis@wdc.com>
Thu, 2 Apr 2020 16:21:06 +0000 (09:21 -0700)
commit600f00b747ff42eb0aa778536d3ef602e8bcd550
treef488e09a78fcd560f95bb885d0cf5148d3294f87
parent5d24ba82c49b75c9f4264b5d62c4e88f4082a99e
linux: Use long time_t for wait4/getrusage

The Linux kernel expects rusage to use a 32-bit time_t, even on archs
with a 64-bit time_t (like RV32). To address this let's convert
rusage to/from 32-bit and 64-bit to ensure the kernel always gets
a 32-bit time_t.

While we are converting these functions let's also convert them to be
the y2038 safe versions. This means there is a *64 function that is
called by a backwards compatible wrapper.

Reviewed-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
include/sys/resource.h
sysdeps/unix/syscalls.list
sysdeps/unix/sysv/linux/getrusage.c [new file with mode: 0644]
sysdeps/unix/sysv/linux/tv32-compat.h
sysdeps/unix/sysv/linux/wait4.c
This page took 0.041341 seconds and 5 git commands to generate.