diff --git a/tools/perf/util/session.h b/tools/perf/util/session.h index 8dd41cad2d59d9f52d8a394901bc51ada2d11f1c..ffb440462008ef55e65884d1849c22af9bb73856 100644 --- a/tools/perf/util/session.h +++ b/tools/perf/util/session.h @@ -126,5 +126,5 @@ int __perf_session__set_tracepoints_handlers(struct perf_session *session, extern volatile int session_done; -#define session_done() (*(volatile int *)(&session_done)) +#define session_done() ACCESS_ONCE(session_done) #endif /* __PERF_SESSION_H */