From: Paolo Bonzini Date: Wed, 8 Jun 2011 22:09:19 +0000 (-0400) Subject: rcutorture: make goflag volatile X-Git-Tag: v0.6.0~37 X-Git-Url: http://git.lttng.org./?a=commitdiff_plain;h=4967f00583bf6700651649ef08cd6d4afe6c3b29;hp=4967f00583bf6700651649ef08cd6d4afe6c3b29;p=urcu.git rcutorture: make goflag volatile Even cmm_barrier may not be enough as a compiler barrier in the presence of static variables, and cmm_mb would not be either! The compiler assumes that calling a function does not clobber static variables if it can prove that they do not escape (which also implies the correct phase of the moon). Rather than sprinkling the code with compiler barriers, I am taking the easy way out and declaring the variable volatile. Without this patch, rcutorture_qsbr never finishes for me (GCC 4.5.0). Signed-off-by: Paolo Bonzini Signed-off-by: Mathieu Desnoyers ---