pthreads and mono

Alexandre Julliard julliard at
Tue Mar 11 11:56:07 CST 2003

Mike Hearn <m.hearn at> writes:

> So the symbols only have to be overridden for within Wine? Because one
> solution would be to have two pthread implementations linked in at once,
> and to keep them separate (lots of fun with the current glibc linker,
> but they are interested in adding features to do that).

No, the whole point is to override them outside of Wine. We don't care
about the pthreads symbols in Wine, but if some other library calls
say pthread_create() it needs to go through Wine so that we can
initialize the Wine structures for the new thread.

> At the moment they use something called monostub, which is a WineLib
> app. That loads and initialises through "wine", then
> loads and hosts the Mono VM inside it. They'd prefer to just dlopen()
> the APIs as called via P/Invoke, but I got the impression they didn't
> really know how to do that... is there much special setup involved when
> you run "wine"?

Quite a bit yes. But if they are doing this then there shouldn't be
any pthreads issue, things are supposed to work in this setup (except
maybe for the pthreads bits that we don't support yet but these
shouldn't be hard to add).

Alexandre Julliard
julliard at

More information about the wine-devel mailing list