24.07.2010 17:16, Florian Klämpfl:
Am 24.07.2010 13:42, schrieb Nikolai Zhubr:
use them to implement this "special management" so as exceptions and
threadvars can be actually used without explicitely using OS APIs.
Delphi does not use a segment register for threadvar handling but OS calls.
For a library - yes, you are right (My memory doesn't serve me good)
However, for an ordinary application - no:
var
a: longint;
threadvar
b: longint;
begin
[...]
a := 1;
mov ebx,00000001
b := a;
call @GetTls
mov [eax+00000004],ebx
[...]
end.
where GetTls in case of an ordinary application (not dll) is just this:
MOV EAX,TlsIndex
MOV EDX,FS:tlsArray
MOV EAX,[EDX+EAX*4]
_______________________________________________
fpc-devel maillist - fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel
_______________________________________________
fpc-devel maillist - fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel