Mike Hearn m.hearn@signal.qinetiq.com 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 monostub.exe.so", 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 foo.exe.so"?
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).