Skip to content
Snippets Groups Projects
Commit 1846a7fa authored by Paul E. McKenney's avatar Paul E. McKenney
Browse files

tools/memory-model: Make read_foo_diagnostic() more clearly diagnostic


The current definition of read_foo_diagnostic() in the "Lock Protection
With Lockless Diagnostic Access" section returns a value, which could
be use for any purpose.  This could mislead people into incorrectly
using data_race() in cases where READ_ONCE() is required.  This commit
therefore makes read_foo_diagnostic() simply print the value read.

Reported-by: default avatarManfred Spraul <manfred@colorfullife.com>
Signed-off-by: default avatarPaul E. McKenney <paulmck@kernel.org>
parent 2734d6c1
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment