From: Keir Fraser Subject: Re: [PATCH] rcu readers - remove dummy lock object Date: Mon, 26 Mar 2007 19:20:39 +0100 Message-ID: References: <20070325195853.GA6407@silverwood.ncultra.org> Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20070325195853.GA6407@silverwood.ncultra.org> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: ncmike@us.ibm.com, xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org On 25/3/07 20:58, "Mike D. Day" wrote: > rcu_read_lock and rcu_read_unlock in Xen are empty macros used to > document the use of rcu techniques. The Xen definition for rcu readers > uses a dummy lock object. The upstream linux code has since redefined > rcu reader lock routines to omit the dummy lock object. This makes rcu > read locking appear similar to memory barriers and other instructions > that do not take an operand. I added the dummy 'lock' object explicitly, as it makes it clearer what object is protected by the critical section. The fact that the operations and the dummy lock typedef both have rcu in the name should avoid confusion with spinlocks. -- Keir