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 _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal