From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55351) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bwcH5-0001sy-RU for qemu-devel@nongnu.org; Tue, 18 Oct 2016 17:50:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bwcH2-0003BO-Ld for qemu-devel@nongnu.org; Tue, 18 Oct 2016 17:50:19 -0400 Received: from mx5-phx2.redhat.com ([209.132.183.37]:57134) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1bwcH2-0003AN-EZ for qemu-devel@nongnu.org; Tue, 18 Oct 2016 17:50:16 -0400 Date: Tue, 18 Oct 2016 17:50:11 -0400 (EDT) From: Paolo Bonzini Message-ID: <557620672.5117372.1476827411758.JavaMail.zimbra@redhat.com> In-Reply-To: <20161018145620.20658-1-bobby.prani@gmail.com> References: <20161018145620.20658-1-bobby.prani@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 1/2] docs/rcu: Distinguish rcu_dereference and atomic_rcu_read List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Pranith Kumar Cc: Sergey Fedorov , Cao jin , "open list:All patches CC here" ----- Original Message ----- > From: "Pranith Kumar" > To: "Paolo Bonzini" , "Sergey Fedorov" , "Cao jin" > , "open list:All patches CC here" > Sent: Tuesday, October 18, 2016 4:56:19 PM > Subject: [PATCH 1/2] docs/rcu: Distinguish rcu_dereference and atomic_rcu_read > > Signed-off-by: Pranith Kumar > --- > docs/rcu.txt | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/docs/rcu.txt b/docs/rcu.txt > index c84e7f4..c177dcb 100644 > --- a/docs/rcu.txt > +++ b/docs/rcu.txt > @@ -197,7 +197,9 @@ DIFFERENCES WITH LINUX > critical section to become an updater. > > - atomic_rcu_read and atomic_rcu_set replace rcu_dereference and > - rcu_assign_pointer. They take a _pointer_ to the variable being accessed. > + rcu_assign_pointer. Note that although both atomic_rcu_read and > + rcu_dereference take a _pointer_ to the variable being accessed, > + atomic_rcu_read dereferences the pointer whereas rcu_dereference does not. No, neither rcu_dereference nor rcu-assign_pointer take a pointer. You use them like rcu_dereference(p) versus QEMU's atomic_rcu_read(&p). Paolo > - call_rcu is a macro that has an extra argument (the name of the first > field in the struct, which must be a struct rcu_head), and expects the > -- > 2.10.1 > >