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? <div>
<br></div><div>{ifdef $unix}</div><div>{ Do I still need this the line below? </div><div>  Do I need to be concerned with different OSes or CPU architectures in the line below?</div><div>  Android ARM, Raspberry Pi ARM, OSX, iOS with whatever CPU ... ? }</div>
<div>uses cthreads; </div><div>{$endif}</div><div><br></div><div>function ThreadFunc(<span style="background-color:rgb(255,255,255);font-family:Courier,monospace;font-size:14px;white-space:nowrap">Parameter: Pointer</span>): PtrInt;</div>
<div>begin</div><div>  <span style="background-color:rgb(255,255,255);font-family:Courier,monospace;font-size:14px;white-space:nowrap">EndThread(0);</span></div><div>end;</div><div><br></div><div>procedure InitThreadAware;</div>
<div>begin</div><div>  BeginThread(@ThreadFunc);</div><div>end;</div>