[fpc-devel] volatile variables

Henry Vermaak henry.vermaak at gmail.com
Tue Jun 28 16:00:59 CEST 2011


On 28/06/11 14:23, Andrew Brunner wrote:
>
> There is no problem no need for volatile variables.  Compare and Swap
> or Interlocked mechanisms will solve any problems.

Nope.  You still need to prevent the cpu from reordering instructions 
with memory barriers.  I'm starting to sound like a broken record.  If 
you don't understand this, use the threading primitives provided by your 
operating system like everyone else.

Henry



More information about the fpc-devel mailing list