summaryrefslogtreecommitdiff
path: root/src/mman
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2019-12-19 19:50:31 -0500
committerRich Felker <dalias@aerifal.cx>2019-12-20 10:08:04 -0500
commit2412638bb39eb799b2600393bbd71cca8ae96bb2 (patch)
tree41d91f0fb4b06b2a258931202a557865edf1b742 /src/mman
parent64d0e86576ef1d33e996a926d6a02d38fb88a768 (diff)
downloadmusl-2412638bb39eb799b2600393bbd71cca8ae96bb2.tar.gz
add further ioctl time64 fallback conversions
this commit covers all remaining ioctls I'm aware of that use time_t-derived types in their interfaces. it may still be incomplete, and has undergone only minimal testing for a few commands used in audio playback. the SNDRV_PCM_IOCTL_SYNC_PTR command is special-cased because, rather than the whole structure expanding, it has two substructures each padded to 64 bytes that expand within their own 64-byte reserved zone. as long as it's the only one of its type, it doesn't really make sense to make a general framework for it, but the existing table framework is still used for the substructures in the special-case. one of the substructures, snd_pcm_mmap_status, has a snd_pcm_uframes_t member which is not a timestamp but is expanded just like one, to match the 64-bit-arch version of the structure. this is handled just like a timestamp at offset 8, and is the motivation for the conversions table holding offsets of individual values to be expanded rather than timespec/timeval type pairs. for some of the types, the size to which they expand is dependent on whether the arch's ABI aligns 8-byte types on 8-byte boundaries. new_req entries in the table need to reflect this size to get the right ioctl request number that will match what callers pass, but we don't have access to the actual structure type definitions here and duplicating them would be cumbersome. instead, the new_misaligned macro introduced here constructs an artificial object whose size is the result of expanding a misaligned timespec/timeval to 64-bit and imposing the arch's alignment on the result, which can be passed to the _IO{R,W,WR} macros.
Diffstat (limited to 'src/mman')
0 files changed, 0 insertions, 0 deletions