From d37c7e99ac9d4e9f5d637ce0a385e62dbc4efdf4 Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Mon, 1 May 2023 09:20:32 -0400 Subject: [PATCH] Update following librseq API update Signed-off-by: Mathieu Desnoyers --- src/rcu.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/rcu.h b/src/rcu.h index 9d33511..86b9e24 100644 --- a/src/rcu.h +++ b/src/rcu.h @@ -81,7 +81,8 @@ void side_rcu_read_begin(struct side_rcu_gp_state *gp_state, struct side_rcu_rea read_state->percpu_count = begin_cpu_count = &cpu_gp_state->count[period]; read_state->cpu = cpu; if (side_likely(side_rcu_rseq_membarrier_available && - !rseq_addv((intptr_t *)&begin_cpu_count->rseq_begin, 1, cpu))) { + !rseq_addv(RSEQ_MO_RELAXED, RSEQ_PERCPU_CPU_ID, + (intptr_t *)&begin_cpu_count->rseq_begin, 1, cpu))) { /* * This compiler barrier (A) is paired with membarrier() at (C), * (D), (E). It effectively upgrades this compiler barrier to a @@ -129,7 +130,8 @@ void side_rcu_read_end(struct side_rcu_gp_state *gp_state, struct side_rcu_read_ */ rseq_barrier(); if (side_likely(side_rcu_rseq_membarrier_available && - !rseq_addv((intptr_t *)&begin_cpu_count->rseq_end, 1, cpu))) { + !rseq_addv(RSEQ_MO_RELAXED, RSEQ_PERCPU_CPU_ID, + (intptr_t *)&begin_cpu_count->rseq_end, 1, cpu))) { /* * This barrier (F) is paired with membarrier() * at (G). It orders increment of the begin/end -- 2.34.1