tech-kern archive

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

Re: __{read,write}_once



Le 16/11/2019 à 15:31, Mindaugas Rasiukevicius a écrit :
Maxime Villard <max%m00nbsd.net@localhost> wrote:
Alright so let's add the macros with volatile (my initial patch). Which
name do we use? I actually like __{read,write}_racy().

I suggest __atomic_load_relaxed()/__atomic_store_relaxed().

What I don't like with "atomic" in the name is that the instructions generated
are not atomic strictly speaking, and I'd rather avoid the confusion with the
really atomic instructions.

But that's not a strong opinion, and I'm fine if we go with it anyway.

If these are to be provided as macros, then I also suggest to ensure that
they provide compiler-level barrier.

You mean __insn_barrier(), right? Surrounding the access (one before, one
after) also, right?


Home | Main Index | Thread Index | Old Index