On 03/04/2013 10:07 AM, Michael Van Canneyt wrote:

We use pthreads on non-windows, and GetTLS/SetTLS on Windows.

Thus the situation is as it was when we discussed this some years ago: a library call with each access to a threadvar, making fpc a lot slower that the C compiler (Microsoft and GNU, no idea about other brands) on that behalf (that might nob be very relevant in real life) .

(BTW: a similar discussion arises with any thread-synchronization primitive AFAIK here dynamic library calls are done while an arch-depending Futex/Mutex implementation directly in the RTL _could_ be done. But here, a C user (Linux) would do the same library call to pthreadlib "mutex...()" which does "Futex"if available in that arch, and "Mutex" if not. )

-Michael
_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to