Source-Changes-D archive

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

Re: CVS commit: src/share/man/man9



On Fri, Dec 08, 2017 at 03:52:01PM +0000, Taylor R Campbell wrote:
 > Modified Files:
 > 	src/share/man/man9: mutex.9
 > 
 > Log Message:
 > Specify memory ordering implied by mutex_(spin_)enter/exit.
 > 
 > I'm hesitant to just say `implies membar_enter/exit' -- that may be a
 > little stronger than we intend, since we don't really mean to
 > guarantee anything about loads and stores before the mutex_enter or
 > after the mutex_exit.  But we probably end up implementing the
 > semantics that we imply membar_enter/exit on all CPUs.

The definition of membar_enter and membar_exit is the way it is to
make the stores involved in *doing* the enter and exit work. This
should not really be exposed outside the mutex code... on some
processors it's possible to order those stores with the ones "inside"
without affecting anyone else.

So I would say that the problem here is in the way membar_enter/exit
are defined; or rather, that they're called that (which is confusing
anyway) rather than e.g. membar_store_any() and membar_any_store().

-- 
David A. Holland
dholland%netbsd.org@localhost


Home | Main Index | Thread Index | Old Index