[fpc-pascal] Where is IsMultiThreaded set under Linux?
Jonas Maebe
jonas.maebe at elis.ugent.be
Fri Oct 8 13:42:54 CEST 2010
On 08 Oct 2010, at 13:33, Graeme Geldenhuys wrote:
> Is it the line with InterlockedExchange() call?
Yes.
> The reason I ask, I'm
> using FPC 2.4.3 under 64-bit linux and using fpGUI. All other
> platforms has a clear 'IsMultiThreaded := True' in the RTL code,
Multiple threads may be started simultaneously, so setting/checking
IsMultiThreaded must be done atomically if it's done inside a new
thread's execution context.
> but
> not for Unix. It seems CheckSynchronized() is never called in
> fpGUI/X11 because IsMultiThread is never True, even though I have
> 'cthreads' unit defined as the first unit in my fpGUI program.
As Sven mentioned, IsMultiThread only becomes true after the first
thread has been started.
Jonas
More information about the fpc-pascal
mailing list