[fpc-devel] Threading support and C library under Linux/Unix

Henry Vermaak henry.vermaak at gmail.com
Tue Jun 22 15:53:14 CEST 2010


On 22 June 2010 14:46, Marco van de Voort <marcov at stack.nl> wrote:
> In our previous episode, Henry Vermaak said:
>> >
>> > Why would you need a native one in the first place?
>>
>> I was under the impression that fpc uses libc to implement threads on
>> unix.  Is this not the case?
>
> Yes. And 99% of the thread using programs also use other C libs that use
> libc anyway (*)

So, to answer your question above about why we need a native one:  so
we can do away with the libc dependency.

> As Jonas explained, two thread systems in one binary is almost certain not
> workable.

Yes, but you wouldn't use the native one when you are linking to libc,
you'll just use pthreads like you do now.

> But does it really warrant making a complex lib for that? And for which

I just link to libc myself, since I've never seen a system without
one, but this whole thread was in response to Michael who complained
that thread support pulls in libc.  So this explored an alternative
solution.

Henry



More information about the fpc-devel mailing list