Re: [PATCH v2 0/7] MR9579: ntdll: On macOS, transform the main thread into a Wine thread (running a CFRunLoop) on launch.
On Wed Jan 28 02:09:33 2026 +0000, Elizabeth Figura wrote:
`start_thread()` jumps to PE code, then we need the Unix call so GSBASE gets set. Also, the PE function lets us handle a syscall fault. I'm not sure I follow what the alternative would be. I might be misunderstanding things, but couldn't we just create the Wine thread but then never jump to PE code? If I'm reading correctly, nothing we want a Wine thread for actually requires PE code to have ever run in the process. Hmmm, like if we had a custom `start_thread()` that went straight to `CFRunLoopRun()` instead of calling `signal_start_thread()` at the end? That would work for logging functions, but I'm pretty sure catching a syscall fault would not work (the syscall_frame isn't set up).
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/9579#note_128220
participants (1)
-
Brendan Shanks (@bshanks)