[fpc-devel] Threading support and C library under Linux/Unix

Michael Schnell mschnell at lumino.de
Thu Jun 24 10:12:04 CEST 2010


On 06/24/2010 10:02 AM, Florian Klaempfl wrote:
> Well, yes, you shouldn't simply use locked operations in a single cpu
> environment, your application should provide different algorithms for
> single and multi cpu/threaded environments if the application really
> contains speed critical code requiring locking. 
Do you suggest the application programmer should take care about if the
application runs on a multi.CPU system or a single CPU system ?
> This is why FPC uses
> inclocked/declocked for fast reference counting.
>   
I don't understand.

with ARM inclocked() calls InterlocktIncrement, that triggers exactly
this problem.

-Michael



More information about the fpc-devel mailing list