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

Michael Schnell mschnell at lumino.de
Thu Oct 21 16:53:35 CEST 2010


  On 10/21/2010 02:53 PM, Marco van de Voort wrote:
> The current threadlib is
> global for all *nix, not *nix flavour-architecture specific.
>
I suppose you are right,

C program use appropriate header files that provide inline functions for 
atomic. Same are "flavor-architecture specific", providing different 
algorithms (with some sub-archs supported by Kernel tricks) to allow for 
atomicness. When compiling an so library it can use the appropriate 
header file (e.g. to do Futex).

Seemingly, to take advantage from this we could use libc to use  Futex 
("pthread_mutex()"). But for static atomic functions the sub-arch needs 
to be known when compiling.

-Michael




More information about the Lazarus mailing list