On Tue, May 15, 2001, Lars Gusmar wrote:

> 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 ?

No, under Runtime you can only use _ONE_ threading facility. As long
as you have both pth_xxx and pthread_xxx API calls in your application
it will never work. So, first step is to replace either all Pthread
calls with Pth calls (simple, because Pth API is a superset of Pthread
API) or vice versa (usually possible for standard applications, but
might be tricky). Then, if you now have only Pth calls, use libpth from
Pth. Alternatively, if you then only have Pthread calls, use _EITHER_
libpthread from Pth or LinuxThreads.

                                       Ralf S. Engelschall
                                       [EMAIL PROTECTED]
                                       www.engelschall.com
______________________________________________________________________
GNU Portable Threads (Pth)            http://www.gnu.org/software/pth/
User Support Mailing List                            [EMAIL PROTECTED]
Automated List Manager (Majordomo)           [EMAIL PROTECTED]

Reply via email to