[Lazarus] thread safe
Michael Schnell
mschnell at lumino.de
Mon Jun 27 16:47:53 CEST 2011
On 06/27/2011 04:17 PM, Andrew Brunner wrote:
> See the link at wikipedia.
I don't think Wikipedia can explain implementation details of the LCL/RTL..
But if TCriticalSection uses a MUTEX (which in fact is a FUTEX as (on
Linux) it uses pthreadlib mutex function from LibC, which automatically
uses FUTEX if available in the underlying arch, otherwise fallback to
MUTEX) (and I believe it is implemented this way) same blocks all at the
start of the section independently from the core they run on, and thus
no concurrent access can happen.
-Michael
More information about the Lazarus
mailing list