gpsd-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: New SHM layout from gpsd


From: Gary E. Miller
Subject: Re: New SHM layout from gpsd
Date: Fri, 20 Jan 2023 11:43:48 -0800

Yo Hal!

On Fri, 20 Jan 2023 02:11:29 -0800
Hal Murray <halmurray@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@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

Attachment: pgptAjbmp1hHO.pgp
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]