On Fri, Oct 17, 2008 at 2:06 PM, Joern Nettingsmeier
They are not equivalent. The first version modifies rb->readptr
twice; the second version modifies once. I can't say with any
certainty that that fixes the problem, but it makes me feel better
(and happens to pass this test).
There's no chance that a compiler optimization is hiding the bug,
because we haven't turned on optimization. HOWEVER, if you go back
to the original version and REMOVE the volatile qualifiers, then
re-compile with -O2, NOW a compiler optimization is hiding the bug
(and the test passes)! The rb->read_ptr is presumably cached in a
register and hence only modified once (giving the same affect as the
Now THAT's interesting...
Linux-audio-user mailing list