On 28/06/11 10:22, Henry Vermaak wrote:
On 27/06/11 23:31, Andrew Brunner wrote:

2.) Execution Order. A critical section does not protect or ensure
that code will be executed in any particular order. This is where

How do you know this? Unfortunately I can't read the code for the
Windows critical sections and the documentation doesn't explicitly state
anything, but at least pthread mutex guarantees a memory barrier. So if
you're using the fpc rtl critical sections on unix (which uses
pthread_mutex), your statement is false.

You'll have to read the generated assembler for Windows critical
sections. My hunch would be that they use memory barriers, too.

http://msdn.microsoft.com/en-us/library/ms686355%28v=VS.85%29.aspx confirms this.

Henry

--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to