Marcus Meissner meissner@suse.de writes:
The afore mentioned glibc guru did not have any ideas either.
There however is a happy but messy end, which appeared to me yesterday: Overwrite those 2 functions with a jump to our implementations.
I'm afraid that won't be enough. When using thread-local storage, glibc doesn't even call __errno_location any more, it directly stores errno into the thread storage using %gs. It seems the only solution is to make Wine threads work on top of libc threads, but that will be messy.
Alexandre Julliard wrote:
I'm afraid that won't be enough. When using thread-local storage, glibc doesn't even call __errno_location any more, it directly stores errno into the thread storage using %gs. It seems the only solution is to make Wine threads work on top of libc threads, but that will be messy.
Can you recap the main issues, or point us to where they were discussed before? (I probably have asked this several times in the past, and apologize for sounding like a broken record.) Is it simply that Windows threads can't be cleanly implemented on top of Posix threads? - Dan
On Fri, Jan 24, 2003 at 10:15:23AM -0800, Alexandre Julliard wrote:
It seems the only solution is to make Wine threads work on top of libc threads, but that will be messy.
IIRC that would make the mono people happy.
Ciao Jörg -- Joerg Mayer jmayer@loplof.de I found out that "pro" means "instead of" (as in proconsul). Now I know what proactive means.
Alexandre Julliard wrote:
I'm afraid that won't be enough. When using thread-local storage, glibc doesn't even call __errno_location any more, it directly stores errno into the thread storage using %gs. It seems the only solution is to make Wine threads work on top of libc threads, but that will be messy.
We have a winethreads-on-pthread implementation that we did for some of our non-x86 work a while back. It's pretty simple, and we haven't really tested it on an x86 machine recently - when we did so last, it definitely had some problems. It is pretty similar to work that Andrew Lewycky did at Corel to support cprof and multithreaded profiling, and probably has some of the same caveats that were discussed on wine-devel in March of 2000.
The code (excluding some configure checks) is here - some updates will probably be required to get it working with a more recent tree. WineHQ is welcome to use it. It would be nice if any improvements made to it were donated to ReWind as well: http://www.geocrawler.com/archives/3/9376/2001/12/50/7309863/
Take care, -Gav