summaryrefslogtreecommitdiff
path: root/arch/x32/ksigaction.h
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2019-07-28 18:51:20 -0400
committerRich Felker <dalias@aerifal.cx>2019-07-29 00:19:16 -0400
commit01f3480d377a764135a1bd28af0d901d765ded50 (patch)
tree41531866975b416fc1636318dd5ce1d8a8104f85 /arch/x32/ksigaction.h
parent7aeecf3e0b5462a05f7173993618eb59ba1a86d5 (diff)
downloadmusl-01f3480d377a764135a1bd28af0d901d765ded50.tar.gz
utimensat: add time64 syscall support, decouple 32-bit time_t
time64 syscall is used only if it's the only one defined for the arch, or if either of the requested times does not fit in 32 bits. care is taken to normalize the inputs to account for UTIME_NOW or UTIME_OMIT in tv_nsec, in which case tv_sec should be ignored. this is needed not only to avoid spurious time64 syscalls that might waste time failing with ENOSYS, but also to accurately decide whether fallback is possible. if the requested time cannot be represented, the function fails with ENOTSUP, defined in general as "The implementation does not support the requested feature or value". neither the time64 syscall, nor this error, can happen on current 32-bit archs where time_t is a 32-bit type, and both are statically unreachable. on 64-bit archs, there are only superficial changes to the SYS_futimesat fallback path, which has been modified to pass long[4] instead of struct timeval[2] to the kernel, making it suitable for use on 32-bit archs even once time_t is changed to 64-bit. for 32-bit archs, the call to SYS_utimensat has also been changed to copy the timespecs through an array of long[4] rather than passing the timespec[2] in-place.
Diffstat (limited to 'arch/x32/ksigaction.h')
0 files changed, 0 insertions, 0 deletions