On Wed, 27 Nov 2002, Dimitrie O. Paun wrote:
On November 27, 2002 03:44 pm, Francois Gouget wrote:
Wine and pthreads don't play well together. You are quite likely to get into trouble if you try to use pthreads from a Winelib application.
I've heard this several times. Now, without looking into the probelm, can't we integrate (for Winelib apps) with pthreads, the same way we do with glibc locks? Anyone know the issues? Is it impossible, just difficult, or simply nobody bothered?
I think that the first problem is that if foo.exe.so links with libpthread.so, then libpthread.so gets loaded and initialized before ntdll.dll.so is loaded and overrides the pthread functions in the C library -> big trouble.
This migh conceivable be worked around using a wrapper like I described for libmfc.so except this time the wrapper would just load libntdll.so and the wrapped executable would link with libpthread.so.
Then I guess it should work since threaded opengl libraries are supposed to work.
But is there really an advantage to using pthread rather than the Win32 threading functions when porting a Windows application? After all one should not have to change the code when porting with Winelib...