New SHM layout from gpsd
Gary E. Miller
gem at rellim.com
Fri Jan 20 19:43:48 UTC 2023
Yo Hal!
On Fri, 20 Jan 2023 02:11:29 -0800
Hal Murray <halmurray at sonic.net> wrote:
> The 31 bit idea seems strange/ugly to me. How did you decide to do
> it that way?
For back compatibility.
> Why is it better than 32 unsigned bits? Is there some case that
> works with 31 bits that breaks with 32?
Yeah, 2038.
> I think there is a case that works for 32 unsigned that doesn't work
> for 31. Consider code that gets updated to use 64 bit time_t but they
> forget to update the SHM interface. That will pick up the 32nd bit
> and do the right think for another 68 years.
No, it will go negative.
> An alternative would be to make the new high-bit slots into 64 bits
> and make the rule use-them, ignore the old slot. That would eat 2
> more dummy words.
Which then breaks 64-bit compatibility.
RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703
gem at rellim.com Tel:+1 541 382 8588
Veritas liberabit vos. -- Quid est veritas?
"If you can't measure it, you can't improve it." - Lord Kelvin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 851 bytes
Desc: OpenPGP digital signature
URL: <https://lists.ntpsec.org/pipermail/devel/attachments/20230120/b0418a9e/attachment.bin>
More information about the devel
mailing list