* [PATCH v2] Docs/RCU: Correct sample code of qatomic_rcu_set
@ 2021-01-06 7:17 Keqian Zhu
2021-01-06 17:02 ` Stefan Hajnoczi
2021-01-07 18:14 ` Paolo Bonzini
0 siblings, 2 replies; 3+ messages in thread
From: Keqian Zhu @ 2021-01-06 7:17 UTC (permalink / raw)
To: Paolo Bonzini, Philippe Mathieu-Daudé, Stefan Hajnoczi
Cc: Peter Maydell, Andrew Jones, Eduardo Habkost, qemu-trivial,
qemu-devel, Peter Xu, qemu-arm, wanghaibin.wang, Keqian Zhu
Correct sample code to avoid confusing readers.
Signed-off-by: Keqian Zhu <zhukeqian1@huawei.com>
Cc: qemu-trivial@nongnu.org
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
---
v2:
- Add Cc and R-b.
---
docs/devel/rcu.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/docs/devel/rcu.txt b/docs/devel/rcu.txt
index cdf002edd8..2e6cc607a1 100644
--- a/docs/devel/rcu.txt
+++ b/docs/devel/rcu.txt
@@ -392,7 +392,7 @@ Instead, we store the size of the array with the array itself:
/* Removal phase. */
old_array = global_array;
- qatomic_rcu_set(&new_array->data, new_array);
+ qatomic_rcu_set(&global_array, new_array);
synchronize_rcu();
/* Reclamation phase. */
--
2.19.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v2] Docs/RCU: Correct sample code of qatomic_rcu_set
2021-01-06 7:17 [PATCH v2] Docs/RCU: Correct sample code of qatomic_rcu_set Keqian Zhu
@ 2021-01-06 17:02 ` Stefan Hajnoczi
2021-01-07 18:14 ` Paolo Bonzini
1 sibling, 0 replies; 3+ messages in thread
From: Stefan Hajnoczi @ 2021-01-06 17:02 UTC (permalink / raw)
To: Keqian Zhu
Cc: Peter Maydell, Andrew Jones, Eduardo Habkost, qemu-trivial,
qemu-devel, Peter Xu, qemu-arm, wanghaibin.wang, Paolo Bonzini,
Philippe Mathieu-Daudé
[-- Attachment #1: Type: text/plain, Size: 482 bytes --]
On Wed, Jan 06, 2021 at 03:17:10PM +0800, Keqian Zhu wrote:
> Correct sample code to avoid confusing readers.
>
> Signed-off-by: Keqian Zhu <zhukeqian1@huawei.com>
> Cc: qemu-trivial@nongnu.org
> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
> Reviewed-by: Peter Xu <peterx@redhat.com>
> ---
>
> v2:
> - Add Cc and R-b.
>
> ---
> docs/devel/rcu.txt | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2] Docs/RCU: Correct sample code of qatomic_rcu_set
2021-01-06 7:17 [PATCH v2] Docs/RCU: Correct sample code of qatomic_rcu_set Keqian Zhu
2021-01-06 17:02 ` Stefan Hajnoczi
@ 2021-01-07 18:14 ` Paolo Bonzini
1 sibling, 0 replies; 3+ messages in thread
From: Paolo Bonzini @ 2021-01-07 18:14 UTC (permalink / raw)
To: Keqian Zhu, Philippe Mathieu-Daudé, Stefan Hajnoczi
Cc: Peter Maydell, Andrew Jones, Eduardo Habkost, qemu-trivial,
qemu-devel, Peter Xu, qemu-arm, wanghaibin.wang
On 06/01/21 08:17, Keqian Zhu wrote:
> Correct sample code to avoid confusing readers.
>
> Signed-off-by: Keqian Zhu <zhukeqian1@huawei.com>
> Cc: qemu-trivial@nongnu.org
> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
> Reviewed-by: Peter Xu <peterx@redhat.com>
> ---
>
> v2:
> - Add Cc and R-b.
>
> ---
> docs/devel/rcu.txt | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/docs/devel/rcu.txt b/docs/devel/rcu.txt
> index cdf002edd8..2e6cc607a1 100644
> --- a/docs/devel/rcu.txt
> +++ b/docs/devel/rcu.txt
> @@ -392,7 +392,7 @@ Instead, we store the size of the array with the array itself:
>
> /* Removal phase. */
> old_array = global_array;
> - qatomic_rcu_set(&new_array->data, new_array);
> + qatomic_rcu_set(&global_array, new_array);
> synchronize_rcu();
>
> /* Reclamation phase. */
>
Queued, thanks.
Paolo
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-01-07 18:14 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-06 7:17 [PATCH v2] Docs/RCU: Correct sample code of qatomic_rcu_set Keqian Zhu
2021-01-06 17:02 ` Stefan Hajnoczi
2021-01-07 18:14 ` Paolo Bonzini
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.