qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] doc/rcu: fix g_free_rcu() usage example
@ 2015-10-14 15:46 Sergey Fedorov
  2015-10-14 15:47 ` Paolo Bonzini
  0 siblings, 1 reply; 2+ messages in thread
From: Sergey Fedorov @ 2015-10-14 15:46 UTC (permalink / raw)
  To: qemu-devel; +Cc: Sergey Fedorov, Fam Zheng, Paolo Bonzini

The first argument of g_free_rcu() is a pointer to a structure.  But
foo_reclaim is used as a function name in the previous example along
with &foo as a pointer to the structure being reclaimed.  Make the
example consistent with the previous one.

Signed-off-by: Sergey Fedorov <serge.fdrv@gmail.com>
---
 docs/rcu.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/docs/rcu.txt b/docs/rcu.txt
index 21ecb81..2f70954 100644
--- a/docs/rcu.txt
+++ b/docs/rcu.txt
@@ -128,7 +128,7 @@ The core RCU API is small:
         the callback function is g_free, in particular, g_free_rcu can be
         used.  In the above case, one could have written simply:
 
-            g_free_rcu(foo_reclaim, rcu);
+            g_free_rcu(&foo, rcu);
 
      typeof(*p) atomic_rcu_read(p);
 
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [Qemu-devel] [PATCH] doc/rcu: fix g_free_rcu() usage example
  2015-10-14 15:46 [Qemu-devel] [PATCH] doc/rcu: fix g_free_rcu() usage example Sergey Fedorov
@ 2015-10-14 15:47 ` Paolo Bonzini
  0 siblings, 0 replies; 2+ messages in thread
From: Paolo Bonzini @ 2015-10-14 15:47 UTC (permalink / raw)
  To: Sergey Fedorov, qemu-devel; +Cc: Fam Zheng



On 14/10/2015 17:46, Sergey Fedorov wrote:
> The first argument of g_free_rcu() is a pointer to a structure.  But
> foo_reclaim is used as a function name in the previous example along
> with &foo as a pointer to the structure being reclaimed.  Make the
> example consistent with the previous one.
> 
> Signed-off-by: Sergey Fedorov <serge.fdrv@gmail.com>
> ---
>  docs/rcu.txt | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/docs/rcu.txt b/docs/rcu.txt
> index 21ecb81..2f70954 100644
> --- a/docs/rcu.txt
> +++ b/docs/rcu.txt
> @@ -128,7 +128,7 @@ The core RCU API is small:
>          the callback function is g_free, in particular, g_free_rcu can be
>          used.  In the above case, one could have written simply:
>  
> -            g_free_rcu(foo_reclaim, rcu);
> +            g_free_rcu(&foo, rcu);
>  
>       typeof(*p) atomic_rcu_read(p);
>  
> 

Thanks, I've queued this patch, and I hope to send it out on Friday.

Paolo

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-10-14 15:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-14 15:46 [Qemu-devel] [PATCH] doc/rcu: fix g_free_rcu() usage example Sergey Fedorov
2015-10-14 15:47 ` Paolo Bonzini

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).