[Lazarus] TRTLCriticalSection
Mattias Gaertner
nc-gaertnma at netcologne.de
Tue Feb 25 13:06:37 CET 2014
On Tue, 25 Feb 2014 12:46:43 +0100
Sven Barth <pascaldragon at googlemail.com> wrote:
> Am 25.02.2014 12:14, schrieb Antonio Fortuny:
> >
> > Le 25/02/2014 12:04, Sven Barth a écrit :
> >> Am 25.02.2014 11:22, schrieb Antonio Fortuny:
> >>> Some help would be appreciated.
> >> The function for initializing a TRTLCriticalSection is
> >> InitCriticalSection, not InitializeCriticalSection. If you wouldn't
> >> use the Windows unit you'd have seen this error on Windows as well.
> > The windows unit is used in the Win32 box (look at the conditional
> > uses clause)
> Yes, nevertheless you would get the same error as on Linux if you would
> *not* use the Windows unit on Win32. Because on Windows
> TRTLCriticalSection is the same as the Windows CRITICAL_SECTION thus
> InitializeCriticalSection will happily take an TRTLCriticalSection as
> argument. However on Linux TRTLCriticalSection is defined differently.
> That Lazarus additionally declared a different TCriticalSection and
> InitializeCriticalSection does not help of course... :/
This uses the widgetsets critical sections.
I personally am satisfied with the RTL one.
Mattias
More information about the Lazarus
mailing list