"Dave Korn" <[EMAIL PROTECTED]> writes:

[...]

| > We (in a major, commercial application) ran into exactly this issue.
| > 'asm volatile("lock orl $0,(%%esp)"::)' is your friend when this happens
| > (it is a barrier across which neither the compiler nor CPU will reorder
| > things). Failing that, no-op cross-library calls (that can't be inlined)
| > seem to do the trick.
| 
|   This simply means you have failed to correctly declare a variable volatile
| that in fact /is/ likely to be spontaneously changed by a separate thread of
| execution.

Note however, that declaring the variable "volatile" is no guarantee
that things will actually work as "expected.  We have had that
discussion before :-)

-- Gaby

Reply via email to