aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPranith Kumar <[email protected]>2014-09-23 10:55:08 -0400
committerArnaldo Carvalho de Melo <[email protected]>2014-09-26 12:36:03 -0300
commit1da34daf24823f19cfd56c97973334cd95635926 (patch)
tree33af8eb005eb7011d8eef987b914d20927d806e0
parent52e0283497ccb1e675d56c9499cc2cc5ec271094 (diff)
perf tools: Use ACCESS_ONCE() instead of volatile cast
Use ACCESS_ONCE() instead of the cast to volatile and read. This is just a style change which is reader friendly. Signed-off-by: Pranith Kumar <[email protected]> Acked-by: Namhyung Kim <[email protected]> Cc: Adrian Hunter <[email protected]> Cc: David Ahern <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Paul Mackerras <[email protected]> Cc: Peter Zijlstra <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
-rw-r--r--tools/perf/util/session.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/perf/util/session.h b/tools/perf/util/session.h
index 8dd41cad2d59..ffb440462008 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 */