The cap here has not been published, plain access is enough. Signed-off-by: Alan Huang <mmpgouride@xxxxxxxxx> --- CodeSamples/count/count_end_rcu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CodeSamples/count/count_end_rcu.c b/CodeSamples/count/count_end_rcu.c index 1171f0b6..8fc70611 100644 --- a/CodeSamples/count/count_end_rcu.c +++ b/CodeSamples/count/count_end_rcu.c @@ -89,7 +89,7 @@ void count_unregister_thread(int nthreadsexpected) //\lnlbl{unreg:b} } //\lnlbl{unreg:alloc:e} spin_lock(&final_mutex); //\lnlbl{unreg:acq} *cap = *countarrayp; //\lnlbl{unreg:copy} - WRITE_ONCE(cap->total, cap->total + counter); //\lnlbl{unreg:add} + cap->total += counter; //\lnlbl{unreg:add} cap->counterp[idx] = NULL; //\lnlbl{unreg:null} capold = countarrayp; //\lnlbl{unreg:retain} rcu_assign_pointer(countarrayp, cap); //\lnlbl{unreg:assign} -- 2.34.1