svn commit: r230201 - head/lib/libc/gen

John Baldwin jhb at freebsd.org
Tue Jan 17 15:17:20 UTC 2012


On Monday, January 16, 2012 1:15:14 am David Xu wrote:
> Author: davidxu
> Date: Mon Jan 16 06:15:14 2012
> New Revision: 230201
> URL: http://svn.freebsd.org/changeset/base/230201
> 
> Log:
>   Insert read memory barriers.

I think using atomic_load_acq() on sem->nwaiters would be clearer as it would
indicate which variable you need to ensure is read after other operations.  In
general I think raw rmb/wmb usage should be avoided when possible as it is 
does not describe the programmer's intent as well.

-- 
John Baldwin


More information about the svn-src-head mailing list