That's obviously kinda hacky. Alternatively, we could have a proper wrapper for the entry point. Didn't consider the i386 case as the thread entry point never returns.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=55014
Signed-off-by: Eric Pouech epouech@codeweavers.com
From: Eric Pouech epouech@codeweavers.com
That's obviously kinda hacky. Alternatively, we could have a proper wrapper for the entry point. Didn't consider the i386 case as the thread entry point never returns.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=55014
Signed-off-by: Eric Pouech epouech@codeweavers.com --- dlls/ntdll/unix/serial.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/dlls/ntdll/unix/serial.c b/dlls/ntdll/unix/serial.c index 734f88aa449..15da2d76a29 100644 --- a/dlls/ntdll/unix/serial.c +++ b/dlls/ntdll/unix/serial.c @@ -937,11 +937,18 @@ static DWORD check_events(int fd, UINT mask, * TIOCMIWAIT only checks modem status line and may not be aborted by a changing mask * */ -static void CALLBACK wait_for_event(LPVOID arg) +static void wait_for_event(LPVOID arg) { async_commio *commio = arg; int fd, needs_close;
+#ifdef __x86_64__ + /* NtCreateThread expects a ms_abi (stdcall) calling convention, that we don't have on unix side... + * so grab directly from effective register. + */ + __asm__ ( "mov %%rcx, %0" : "=rm" ( commio )); +#endif + if (!server_get_unix_fd( commio->hDevice, FILE_READ_DATA | FILE_WRITE_DATA, &fd, &needs_close, NULL, NULL )) { serial_irq_info new_irq_info;
We should never create a Win32 thread on the Unix side.
Event polling should be reimplemented using async I/O.
Ok, but that's a way larger change. Closing then.
This merge request was closed by eric pouech.
On Tue Nov 28 01:09:46 2023 +0000, eric pouech wrote:
Ok, but that's a way larger change. Closing then.
I also encountered similar problems.