On 02 Aug 2009, at 20:02, Wimpie Nortje wrote:

Thanks for the response.

The library uses a centralised function to start all its threads using pthread_create. If I can make this central function inform FPC about all the threads created, would this work?

There is no interface in the RTL to inform it about newly created external threads, so it would be quite hard.

Assuming it would work: what information would FPC require? When would this info be required, before or after thread creation? What needs to be done on the FPC side with this info?


Look at rtl/unix/cthreads.pp, in the functions CBeginThread/ThreadMain and CEndThread (they also call generic code from rtl/inc/thread.inc, such as InitThread and DoneThread).


Jonas
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to