Page MenuHomeFreeBSD

sys/compat/freebsd32: FF clock struct: Don't pack, use 'ffcounter32'
AcceptedPublic

Authored by olce on Fri, Feb 13, 10:23 PM.

Details

Reviewers
kib
brooks
Summary

Packing 'struct ffclock_estimate32', in absence of substitution of
'ffcounter' (some 'uint64_t') by a 32-bit compatible type, was necessary
on amd64 since 'uint64_t' is 8-byte aligned, which leaves a padding gap
of 4-byte between fields 'update_time' and 'update_ffcount'. This gap
does not exist on i386 (or amd64 32-bit mode), as 'uint64_t' there is
only 4-byte aligned.

Change the type of the 'update_ffcount' and 'leapsec_next' fields to the
recently introduced 'freebsd32_uint64_t', and adapt copy-in and copy-out
accordingly. Using CP() previously worked due to the 'packed'
attribute.

Sponsored by: The FreeBSD Foundation

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 70669
Build 67552: arc lint + arc unit