This reworks `set_native_thread_name()` for macOS to not rely on mach thread ports returned server side (which were potentially colliding cross-process anyways) and re-implements what `pthread_setname_np()` would do on wines side, with additionally allowing setting threadnames cross-process.
On the kernel side `bsd_setthreadname()` is apparently "known to race with regards to the contents of the thread name", so that is only exposed for the thread calling it on itself.
Since the pthread struct is private, the location of the thread name is determined at runtime (although in practice, it is constant (80 bytes) from at least 10.15 up to 14.0).
This has an effect on both `pthread_getname_np()` and the `NSThread` implementation on top a native library would use.
Cross-thread naming is only not visible to external debuggers, which have acquired a mach port right and calling `thread_info()` with `THREAD_EXTENDED_INFO`
--
v2: ntdll: Reimplement set_native_thread_name() for macOS.
https://gitlab.winehq.org/wine/wine/-/merge_requests/4854
This series' main purpose is to fix the handles' attributes
of standard I/O handles in CreateProcess.
Needed behavior in CreateProcess is implemented by supporting
the DUPLICATE_SAME_ATTRIBUTES option in NtDuplicateObject() and
DuplicateHandle().
This option is not documented in SDK, but is in DDK.
Manifest constant has been added to DDK header (maybe now
Wine's DUPLICATE_MAKE_GLOBAL could be moved here to).
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/4613
When two sends are performed in parallel on a socket the send which came second to server's (socked_send) will always considered blocking if the first send hasn't performed set_async_direct_result() in client's ntdll yet. Similarly, if select() is coming shortly after send() it may report socket as not write ready. We don't care for avoiding a race here because if those two sends or send / select are not synced by app it is unlikely possible for an app to depend on which gets processed first, and the one which was called earlier in wall time now also is not guaranteed to be actually processed first.
The patches fix Tekken 8 which gets frequently disconnected from multiplayer matches. The game treats WSAEWOULDBLOCK from send() on its non-blocking UDP socket, as well as the same socket not reported as write ready from select as a disconnection condition. Those conditions normally (outside of actual network problem / contention) only happen due to the races described above (while the game performs send() concurrently from different threads or is racing send with select).
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/4967
--
v2: mshtml/tests: Test builtin function default value getter with custom
mshtml: Expose the IHTMLEventObj5 props to scripts.
mshtml: Implement `initMessageEvent` for MessageEvents.
mshtml: Implement `origin` prop for MessageEvents.
mshtml: Implement `data` getter for MessageEvent objs.
mshtml: Implement `source` prop for MessageEvents.
mshtml: Use a hook to implement postMessage.
https://gitlab.winehq.org/wine/wine/-/merge_requests/4986
As _WINE_HWND_STYLE and _WINE_HWND_EXSTYLE respectively.
Gamescope parses these to make smarter decisions about what window
to primary focus, or to treat as a dropdown/overlay.
This was originally a Proton commit by Remi Bernon, however,
it would definitely be nice to have support for Gamescope focusing
correctly under upstream Wine as well.
Fixes a bunch of games/launchers run with Wine under Gamescope.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/2902