[fpc-pascal] getting started with threads

Florian Klaempfl florian at freepascal.org
Fri Sep 18 20:21:48 CEST 2009


Jonas Maebe schrieb:
> 
> On 18 Sep 2009, at 16:24, Dariusz Mazur wrote:
> 
>> I use own lockfree FIFO http://www.emadar.com/fpc/lockfree.htm to
>> distribute task between threads
>> its much faster and well scaling on multicore.
> 
> Note that it won't work as is on non-x86 machines, because it's missing
> memory barriers (and I think that you may actually need memory barriers
> on x86 too). Atomic operations are not memory barriers by themselves,
> and the fact that you perform an atomic operation does not mean that
> afterwards all cpu's will immediately see this new value.

On x86 they are.



More information about the fpc-pascal mailing list