Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 17 Jan 2012 09:57:47 -0500
From:      John Baldwin <jhb@freebsd.org>
To:        David Xu <davidxu@freebsd.org>
Cc:        svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org
Subject:   Re: svn commit: r230201 - head/lib/libc/gen
Message-ID:  <201201170957.47718.jhb@freebsd.org>
In-Reply-To: <201201160615.q0G6FE9r019542@svn.freebsd.org>
References:  <201201160615.q0G6FE9r019542@svn.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201201170957.47718.jhb>