qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Pranith Kumar <bobby.prani@gmail.com>
Cc: Sergey Fedorov <serge.fdrv@gmail.com>,
	Cao jin <caoj.fnst@cn.fujitsu.com>,
	"open list:All patches CC here" <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH 1/2] docs/rcu: Distinguish rcu_dereference and atomic_rcu_read
Date: Tue, 18 Oct 2016 17:50:11 -0400 (EDT)	[thread overview]
Message-ID: <557620672.5117372.1476827411758.JavaMail.zimbra@redhat.com> (raw)
In-Reply-To: <20161018145620.20658-1-bobby.prani@gmail.com>



----- Original Message -----
> From: "Pranith Kumar" <bobby.prani@gmail.com>
> To: "Paolo Bonzini" <pbonzini@redhat.com>, "Sergey Fedorov" <serge.fdrv@gmail.com>, "Cao jin"
> <caoj.fnst@cn.fujitsu.com>, "open list:All patches CC here" <qemu-devel@nongnu.org>
> 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 <bobby.prani@gmail.com>
> ---
>  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
> 
> 

      parent reply	other threads:[~2016-10-18 21:50 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-18 14:56 [Qemu-devel] [PATCH 1/2] docs/rcu: Distinguish rcu_dereference and atomic_rcu_read Pranith Kumar
2016-10-18 14:56 ` [Qemu-devel] [PATCH 2/2] translate-all: Use proper type Pranith Kumar
2016-10-18 18:34   ` Emilio G. Cota
2016-10-18 18:43     ` Eric Blake
2016-10-18 19:14       ` Pranith Kumar
2016-10-18 21:55   ` Paolo Bonzini
2016-10-18 21:50 ` Paolo Bonzini [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=557620672.5117372.1476827411758.JavaMail.zimbra@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=bobby.prani@gmail.com \
    --cc=caoj.fnst@cn.fujitsu.com \
    --cc=qemu-devel@nongnu.org \
    --cc=serge.fdrv@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).