Port-mips archive

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

Re: atomic_ops(3) and sync



Antti Kantee <pooka%cs.hut.fi@localhost> wrote:
> Speaking of that, there's a per-arch cpp macro __HAVE_ATOMIC_AS_MEMBAR,
> which I've interpreted to mean "atomic operations provide full membar"
> (but haven't found any documentation to confirm it).

In some architectures, like x86, atomic operation also provides a memory
barrier.  We use __HAVE_ATOMIC_AS_MEMBAR in MI code, like file descriptor
management subsystem, for (micro)optimisations.

It might be useful to kill #ifdef and amend atomic_ops(3) interface.

-- 
Mindaugas


Home | Main Index | Thread Index | Old Index