I have a good understanding of the system objects available to
protect the counter variable above. This example comes from a
larger system. Adding one line of code, would take months to
rebuild, retest, redeploy. In a finite system such as computer
programming, I am trying not to assume anything. I am trying to
figure out if the above assuptions are the only possible
influences on the counter variable (comment about printf
statement noted). A colleague insists that at one time or
another the variable could contain a "garbage" value. I tend to
insist that the value x will always clearly reflect the number
of operations performed - (minus) the number of times the race
condition is hit. Anybody willing to take sides? Last edited by
RwAA23; March 30th, 2009 at 04:39 AM. >> Anybody willing to take
sides? The actual answer depends on the CPU architecture and the
assembly instructions generated by the compiler (which could
easily change with the change of a compiler option...). The
general answer has been given. Any