tech-kern archive

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

Re: __{read,write}_once

On Wed, Nov 06, 2019 at 06:57:07AM -0800, Jason Thorpe wrote:
> > This matches atomic_load_relaxed() / atomic_write_relaxed(), but we do
> > not deal with atomics here.
> Fair enough.  To me, the names suggest "compiler is allowed to apply
> relaxed constraints and tear the access if it wants".... But apparently
> the common meaning is "relax, bro, I know what I'm doing".  If that's
> the case, I can roll with it.

What is the compiler / implementation supposed to do if there is no way
to do a single instruction load/store for the argument size?
Do we want sized versions instead and only provide the ones that are
available on a given architecture?

If both names and semantics are unclear, adding the macros maybe not a
good idea ;-)


Home | Main Index | Thread Index | Old Index