[lttng-dev] [PATCH] QSBR: Use xor operation to replace add operation when changing rcu_gp.ctr value

2022-02-16 Thread yaowenbin via lttng-dev
It is enough to have three values of rcu_gp.ctr, 00 for INACTIVE, 01 or 11 for ACTIVE. So it is possible to replace add operation with xor operation when changing rcu_gp.ctr value. Signed-off-by: yaowenbin --- src/urcu-qsbr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sr

Re: [lttng-dev] [PATCH] QSBR: Use xor operation to replace add operation when changing rcu_gp.ctr value

2022-02-16 Thread Mathieu Desnoyers via lttng-dev
- On Feb 16, 2022, at 2:35 AM, lttng-dev lttng-dev@lists.lttng.org wrote: > It is enough to have three values of rcu_gp.ctr, 00 for INACTIVE, > 01 or 11 for ACTIVE. So it is possible to replace add operation > with xor operation when changing rcu_gp.ctr value. What is missing here is a descri

Re: [lttng-dev] [PATCH] QSBR: Use xor operation to replace add operation when changing rcu_gp.ctr value

2022-02-16 Thread Paul E. McKenney via lttng-dev
On Wed, Feb 16, 2022 at 03:53:20PM -0500, Mathieu Desnoyers wrote: > - On Feb 16, 2022, at 2:35 AM, lttng-dev lttng-dev@lists.lttng.org wrote: > > > It is enough to have three values of rcu_gp.ctr, 00 for INACTIVE, > > 01 or 11 for ACTIVE. So it is possible to replace add operation > > with xo