On Mon, Jun 27, 2011 at 7:57 AM, Michael Schnell <mschn...@lumino.de> wrote: > There is no question that we all agree about the technical background of all > this.
Actually, There was no mention of memory barriers other than the content in my post. So if you want to understand what that is here is a link... http://en.wikipedia.org/wiki/Memory_barrier Simply protecting a loop with a futex is not sufficient. Assigning variables in a multi-threaded environment is not sufficient. Interlocked/Exchange/ExchangeAdd/Increment features must be used whenever dealing with variables (with at least one exception) In my experience arrays of boolean are atomic. I ran tests on a HexCore AMD system which had unexplained anomalies with pointers in an bidirectional linked list. I replaced all the pointer assignments with InterlockedExchange and the system worked flawlessly. Some of the assignments were taking place in a criticalsection (btw). -- _______________________________________________ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus