Title: AW: PThreads (Pth) <--> Pthreads(glibc)

Hello all,

As described below I'm thinking about the simplest possibility to
merge two programms, one uses Gnu Pth and the other one uses the
Linux pthreads.

What about to make a shared object lib with the Linux Pthreads stuff
and load them with dlopen etc. ?

What happend if the lib with the pthread stuff is loaded?
I mean, the lib will load from ld and therefore also libpthread,
because of the dependency, while the main program with pth is
already loaded. Does this work ?

Thanks in advance
Lars Gusmar




-----Ursprungliche Nachricht-----
>
>
>Von: [EMAIL PROTECTED]
>[mailto:[EMAIL PROTECTED]] Im Auftrag von Ralf S. Engelschall
>Gesendet: Donnerstag, 29. Marz 2001 12:06
>An: [EMAIL PROTECTED]
>Betreff: Re: PThreads (Pth) <--> Pthreads(glibc)
>
>On Thu, Mar 29, 2001, Lars G. wrote:
>
>> I'm trying to merge two programms, one uses the linux pthreads and the other
>> one uses Gnu Pth.
>
>What do you mean with "merging"? Merging on the source level?  If yes and the
>used API is Pthreads, you never should need both Pth and LinuxThreads, because
>both provide Pthreads API. Then just use either Pth or LinuxThreads, but never
>both.
>
>> I linked both libs, but get errors during runtime.
>
>That's clear, linking in both libs cannot work. They are mutually exclusive,
>because both provide the same API, but implement it differently. So
>even if it would link successfully it certainly will not run.
>
<...some stuff deleted
>
>> Is the pthread from pth compatible with pthread from glibc ?
>On the source level: yes. Except for a few non-standard and/or obsolete
>Pthread API things present in LinuxThreads.  On the object linking level: no.
>
>                                       Ralf S. Engelschall
>                                       [EMAIL PROTECTED]
>                                       www.engelschall.com

Reply via email to