[Lazarus] Anyone using LCLIntf critical section routines?
Boian Mitov
mitov at mitov.com
Sun Jun 22 23:48:50 CEST 2008
Hi Felipe,
We use them for code compatibility with Delphi. Windows threads do not
tolerate non "cdecl" Delphi calling conventions insade them, so we are
forced to use Win32 API critical sections to work around this problem. We
have not tested enough yet to see if the same problem exists in Lazarus. If
the problem is confirmed the CriticalSection Enter/Leave routines may have
to be changed to be "cdecl" (at least under Windows) for Windows system
threads compatibility. Becouse of this problem I have seen number of Delphi
libraryes use Win32 API CriticalSection routines instead of the SyncObjs
object. If you decide the functions are not needed, we can create our own
CriticalSection wrapper, and call the Win32 API when using Delphi and the
TCriticalSection from SyncObjs in Lazarus. You may however still consider
keeping them for making it easier for other developers to port from existing
Delphi code.
I must admit however that there are not so many heavily threaded
applications and libraries. The only ones I have seen having this "cdecl"
problem are multimedia (both DirectShow and VFW) calls and the
"timeSetEvent" timers. This probably will have relatively small effect on
the overall number of libraries and Delphi applications, so you can probably
safely remove it, with limited effect. I don't have any serious objections,
and if you plan the removal will start modifying our code to use our own
wrapper.
With best regards,
Boian Mitov
--------------------------------------------------------------------
Mitov Software
http://www.mitov.com
--------------------------------------------------------------------
----- Original Message -----
From: "Felipe Monteiro de Carvalho" <felipemonteiro.carvalho at gmail.com>
To: "General mailing list" <lazarus at lazarus.freepascal.org>
Sent: Sunday, June 22, 2008 11:35 AM
Subject: [Lazarus] Anyone using LCLIntf critical section routines?
> Hello,
>
> We are considering removing the critical section routines in LCLIntf,
> because there is already a TCriticalSection in the RTL in the SyncObjs
> unit.
>
> If noone objects, and proves that those routines are useful for
> something in 1 week, we will remove them.
>
> thanks,
> --
> Felipe Monteiro de Carvalho
> _______________________________________________
> Lazarus mailing list
> Lazarus at lazarus.freepascal.org
> http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
More information about the Lazarus
mailing list