Skip to content

Commit

Permalink
perf tools: Use ACCESS_ONCE() instead of volatile cast
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
pranith authored and acmel committed Sep 26, 2014
1 parent 52e0283 commit 1da34da
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/perf/util/session.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */

0 comments on commit 1da34da

Please sign in to comment.