Re: [fpc-pascal] Stack problem in externally called callback function

2009-08-02 Thread Wimpie Nortje
The FPC thread setup code (CAllocateThreadVars, InitThread) happens inside the newly created thread before the user's thread function starts. The only viable way I see to get support from the C library is for it to inform FPC about a new thread after creation, but this means that the C user's

Re: [fpc-pascal] Stack problem in externally called callback function

2009-08-02 Thread Wimpie Nortje
Thanks, I'll have a look Jonas Maebe wrote: 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 thi

Re: [fpc-pascal] Stack problem in externally called callback function

2009-08-02 Thread Jonas Maebe
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 t

Re: [fpc-pascal] Stack problem in externally called callback function

2009-08-02 Thread Wimpie Nortje
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? Assuming it would work: what information would FPC require? When would this info be