Dmitry Timoshkov : server: Deliver an async io APC to any thread alive in the process.

Alexandre Julliard julliard at winehq.org
Mon Nov 13 16:24:19 CST 2017


Module: wine
Branch: master
Commit: 9b0c222f39f8c5cd6634394b3aae8804db87d937
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=9b0c222f39f8c5cd6634394b3aae8804db87d937

Author: Dmitry Timoshkov <dmitry at baikal.ru>
Date:   Tue Nov  7 11:11:10 2017 +0800

server: Deliver an async io APC to any thread alive in the process.

Signed-off-by: Dmitry Timoshkov <dmitry at baikal.ru>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/ws2_32/tests/sock.c | 6 +-----
 server/async.c           | 2 +-
 2 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/dlls/ws2_32/tests/sock.c b/dlls/ws2_32/tests/sock.c
index 4cbc1e9..cb8b7ce 100644
--- a/dlls/ws2_32/tests/sock.c
+++ b/dlls/ws2_32/tests/sock.c
@@ -11292,15 +11292,13 @@ static void iocp_async_read_thread_closesocket(SOCKET src)
     ok(!ret, "got %d\n", ret);
 todo_wine
     ok(GetLastError() == ERROR_CONNECTION_ABORTED || GetLastError() == ERROR_NETNAME_DELETED /* XP */, "got %u\n", GetLastError());
-todo_wine
     ok(!bytes, "got bytes %u\n", bytes);
-todo_wine
     ok(key == 0x12345678, "got key %#lx\n", key);
-todo_wine
     ok(ovl_iocp == &recv_info.ovl, "got ovl %p\n", ovl_iocp);
     if (ovl_iocp)
     {
         ok(!ovl_iocp->InternalHigh, "got %#lx\n", ovl_iocp->InternalHigh);
+todo_wine
         ok(ovl_iocp->Internal == (ULONG)STATUS_CONNECTION_ABORTED || ovl_iocp->Internal == (ULONG)STATUS_LOCAL_DISCONNECT /* XP */, "got %#lx\n", ovl_iocp->Internal);
     }
 
@@ -11417,7 +11415,6 @@ static void iocp_async_read_thread(SOCKET src, SOCKET dst)
     Sleep(100);
     memset(&msg, 0, sizeof(msg));
     ret = PeekMessageA(&msg, hwnd, WM_SOCKET, WM_SOCKET, PM_REMOVE);
-todo_wine
     ok(!ret || broken(msg.hwnd == hwnd) /* XP */, "got %04x,%08lx,%08lx\n", msg.message, msg.wParam, msg.lParam);
     if (ret) /* document XP behaviour */
     {
@@ -11432,7 +11429,6 @@ todo_wine
     ovl_iocp = (void *)0xdeadbeef;
     SetLastError(0xdeadbeef);
     ret = GetQueuedCompletionStatus(port, &bytes, &key, &ovl_iocp, 100);
-todo_wine
     ok(ret || broken(GetLastError() == WAIT_TIMEOUT) /* XP */, "got %u\n", GetLastError());
     if (ret)
     {
diff --git a/server/async.c b/server/async.c
index 4e89e1e..4f1bcf1 100644
--- a/server/async.c
+++ b/server/async.c
@@ -167,7 +167,7 @@ void async_terminate( struct async *async, unsigned int status )
             data.async_io.user   = async->data.user;
             data.async_io.sb     = async->data.iosb;
             data.async_io.status = status;
-            thread_queue_apc( NULL, async->thread, &async->obj, &data );
+            thread_queue_apc( async->thread->process, async->thread, &async->obj, &data );
         }
         else async_set_result( &async->obj, STATUS_SUCCESS, 0 );
     }




More information about the wine-cvs mailing list