diff --git a/lib/sp-perf-counter.c b/lib/sp-perf-counter.c index bd7315b3..d41bc9ea 100644 --- a/lib/sp-perf-counter.c +++ b/lib/sp-perf-counter.c @@ -291,6 +291,8 @@ sp_perf_counter_flush (SpPerfCounter *self, } info->tail = tail; + + atomic_thread_fence (memory_order_seq_cst); info->map->data_tail = tail; }