All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] perf: Use ACCESS_ONCE() instead of volatile cast
@ 2014-09-23 14:55 Pranith Kumar
  2014-09-24  2:31 ` Namhyung Kim
  2014-09-27  7:25 ` [tip:perf/core] perf tools: " tip-bot for Pranith Kumar
  0 siblings, 2 replies; 4+ messages in thread
From: Pranith Kumar @ 2014-09-23 14:55 UTC (permalink / raw)
  To: Peter Zijlstra, Paul Mackerras, Ingo Molnar,
	Arnaldo Carvalho de Melo, Jiri Olsa, David Ahern, Adrian Hunter,
	Namhyung Kim, open list:PERFORMANCE EVENT...

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 <bobby.prani@gmail.com>
---
 tools/perf/util/session.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/perf/util/session.h b/tools/perf/util/session.h
index 8dd41ca..ffb4404 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 */
-- 
2.1.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-09-27  7:25 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-23 14:55 [PATCH] perf: Use ACCESS_ONCE() instead of volatile cast Pranith Kumar
2014-09-24  2:31 ` Namhyung Kim
2014-09-26 15:37   ` Arnaldo Carvalho de Melo
2014-09-27  7:25 ` [tip:perf/core] perf tools: " tip-bot for Pranith Kumar

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.