couple of questions about pthreads (scheduler/pthread.c) in wine

Juraj Hercek juraj at syncad.com
Fri Jun 13 06:31:15 CDT 2003


Hi,

I've ported an application which uses a library - let's call it 
aceutilities.so - which in turn uses ACE library 
(http://www.cs.wustl.edu/~schmidt/ACE.html). ACE uses libpthread.so 
library. So the dependency is like this: my_application -> 
aceutilities.so -indirectly via ace library-> libpthread.so

Wine's scheduler/pthread.c (compiled code resides in ntdll.dll.so) 
defines couple of symbols, which are defined (if we don't take symbol 
versions into consideration)  also in libpthread.so. Now you probably 
feel what's my problem:

After loading application into memory, dynamic linker loads wine stuff 
first, then when loading aceutilities.so into memory, pthread symbols 
are defined in module ntdll.dll.so - already loaded into memory - and so 
it doesn't try to load libpthread.so, because pthread symbols are 
already resolved.

My questions are:
1) Why Winelib uses it's own implementation of pthreads (at least it 
looks like this is intention)?
2) Is it possible to force linker to use symbols from libpthread.so 
instead of symbols from ntdll.dll.so? (I don't know how to tell linker 
to use symbol, e.g. pthread_cond_wait,  from specified library, i.e. 
/lib/libpthread.so.0).

Thanks for help,
Juraj





More information about the wine-devel mailing list