On Tue, Jun 28, 2011 at 7:40 AM, Michael Schnell <mschn...@lumino.de> wrote: > All references I read today say that pthread_mutex (on which supposedly > TCriticalSection is based) and the appropriate Windows stuff does contain an > MB. But there might be issues with other OSes and Archs. >
Yes, any object that requires atomic features will employ a memory barrier. That is to say the MB is employed in order for the spincount to be accurate across all cores. > If they would not do so, the complete plain old threaded application > paradigm would be invalid, and tons of applications would need to be > trashed. > -Michael Probably right here. My engine had worked fine on a tripple core AMD. It wasn't until I upgraded to the 6 core system did I have to start looking into what was causing random problems with pointer assignments. -- _______________________________________________ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus