Mutex and Atomic (was 64 bit time_t on 32 bit systems)
Gary E. Miller
gem at rellim.com
Fri Jan 20 19:50:27 UTC 2023
Yo Hal!
On Thu, 19 Jan 2023 21:43:08 -0800
Hal Murray <halmurray at sonic.net> wrote:
> gem at rellim.com said:
> > Sadly, that no longer works on modern CPUs with out of order
> > execution. Unless wrapped in a mutex, or atomic, and that is now a
> > no-no.
>
> Do you have a good reference for that?
Many ariticle on lwn.net.
> I'd like something like a nice blog article that explains things.
Sadly work in this area has been slow and disjoint. Following lwn.net
is the onely way I know to keep up with it.
> What is the new/wonderful way? Even if you do something like a
> kernel call with a file handle, deep inside there I'd expect a mutex
> to make sure the right thing happens if 2 threads try to do the same
> operation at the same time.
Many techniques, RCU, Red/Black trees, etc.
> Is there a blog type page describing the TIME_BITS stuff?
Yes, the gpsd issue:
https://gitlab.com/gpsd/gpsd/-/issues/152
Which has links to other sources.
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/09bbaabb/attachment.bin>
More information about the devel
mailing list