[Lazarus] TThread.WaitFor blocks the main event loop under Linux

Michael Schnell mschnell at lumino.de
Tue Oct 19 10:41:15 CEST 2010


  On 10/18/2010 06:54 PM, Vincent Snijders wrote:
>
> Michael, please read
> http://wiki.lazarus.freepascal.org/libc_unit#The_problem_with_unit_libc,
> so you know what you are talking about and understand the difference
> between library libc and unit libc.
I do know, but anyway while it does make sense to use some functions 
from libc, there might be others that maybe better are done in the RTL 
without accessing the libc equivalent.

Thread support _might_ be a candidate, as threadvar access could be 
improved (but maybe it could be improved even without dropping the 
threadlib binding). OTOH threadlib automatically provides FUTEX access 
for archs that provide it.

OTOH, on archs like the different ARM flavors, the RTL implementation of 
"atomic" functions is not perfect.here using or looking at libc might 
lead to an improvement, as same automatically uses the appropriate 
Kernel-helper-functions or the advanced hardware instructions if 
available in the sub-arch without the need of recompiling the project.

-Michael




More information about the Lazarus mailing list