Oh, I just thought of a followup question. If I have to call BeginThread to
make the memory manager/rtl "thread aware", do I then have to also have to
check the OS type (and maybe the CPU architecture) and possibly add more
units? Is it safe to call BeginThread on all platforms/architectures using
only the System unit?
{ifdef $unix}
{ Do I still need this the line below?
Do I need to be concerned with different OSes or CPU architectures in the
line below?
Android ARM, Raspberry Pi ARM, OSX, iOS with whatever CPU ... ? }
uses cthreads;
{$endif}
function ThreadFunc(Parameter: Pointer): PtrInt;
begin
EndThread(0);
end;
procedure InitThreadAware;
begin
BeginThread(@ThreadFunc);
end;
_______________________________________________
fpc-pascal maillist - [email protected]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal