tech-kern archive

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

Re: membar_enter semantics



> On Feb 11, 2022, at 5:33 AM, Taylor R Campbell <riastradh%netbsd.org@localhost> wrote:
> 
> So I propose to change the membar_enter documentation to match the
> definitions and usage (and change the riscv definition), making it
> instead:
> 
>     membar_enter()
>           Any load preceding membar_enter() will happen before all memory
>           operations following it.
> 
> This will also let us delete the obnoxious text I added to
> atomic_loadstore(9) warning about membar_enter semantics.

I would prefer we adopt the Solaris description about a generic barrier that provides “lock-is-visible-before-load/store” without explicitly stating “load-before-load/store”, and provide a new membar_acquire() that means “load-before-load/store”.

-- thorpej



Home | Main Index | Thread Index | Old Index