Marcus Meissner wrote: > So we no longer can overwrite __errno_location to have our own errno storage, so > we need to cooperate with the libc threading.
I had been wondering whether Wine could just implement whatever support the thread library is supposed to provide to enable proper TLS. However, this appears difficult, as TLS support is spread out across the dynamic linker, libc, and the thread library with no (to me) clear interfaces. Apparently there is even code from the thread library directly compiled into ld.so, so you cannot change thread libraries (e.g. from linuxthreads to ntpl) without changing ld.so at the same time :-/ On the other hand, maybe it would now be possible to implement Wine threads on top of regular pthreads; at least some of the inhibitors should be gone now, e.g. you can have thread stacks at arbitrary locations and sizes, and there is no master thread any more ... Unfortunately I don't quite remember the full list of problems we had with pthreads ;-/ B.t.w. the whole new thread handling could also have an advantage for Wine: the kernel now provides support for TLS by reloading GDT descriptors on context switch. This means that Wine could use one of the two TLS GDT entries for its %fs selector, which means that Wine processes might not actually need to allocate a LDT (for 32-bit programs only, of course) ... Bye, Ulrich -- Dr. Ulrich Weigand [EMAIL PROTECTED]