[fpc-pascal] What's the status of RTL and IsMultiThreaded := True?

Anthony Walter sysrpl at gmail.com
Sat Apr 13 16:06:13 CEST 2013


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;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20130413/c2d8c113/attachment.html>


More information about the fpc-pascal mailing list