On 7/16/06, Mike Hearn mike@plan99.net wrote:
On 7/16/06, Dan Kegel dank@kegel.com wrote:
I'd rather not take the chance of doing anything that messes with the poor thread we're hijacking. Hmm... http://lwn.net/Articles/7577/ makes me think that converting a linux thread to a win32 thread might require initializing the thread's TLS area. We'll look at that a bit.
Basically everything along the Wine CreateThread codepath .... setting up a server connection, registering it with the server, initializing the TEB, signal setup, synchronizing the Wine VM list with the Linux VM list, allocating a guard page, doing thread attach notifications and finally calling the entrypoint inside a SEH backstop handler.
Quite a lot of work, really, so I think it's easier to create the thread from another Wine thread somehow.
It would be, except for the scary questions of a) whether the thread is in the middle of something that would interfere, and b) whether jamming a CreateThread call into an existing thread might disturb it somehow. - Dan