Michael Schnell wrote:
...
This is essentially the same code as with Delphi. Supposedly as with Delphi [__tls_index (417328h) ] is always 0 with normal applications. (no idea what this is useful for)

The TLS index is allocated by a call to TlsAlloc at application startup. It will be zero for the first call and increasing for subsequent calls. The subsequent calls are typically done by libraries that use threadvars. This approach ensures that threadvar blocks of each module in process do not clash.

Regards,
Sergei

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

Reply via email to