From 50975c81f0d595f6b8a683b861a9c4dd5c819c62 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Tue, 20 Mar 2007 19:27:10 +0100 Subject: [PATCH] server: Return the status from an async I/O APC call to the server. --- dlls/ntdll/sync.c | 2 ++ include/wine/server_protocol.h | 7 ++++++- server/protocol.def | 5 +++++ server/trace.c | 4 ++++ 4 files changed, 17 insertions(+), 1 deletion(-) diff --git a/dlls/ntdll/sync.c b/dlls/ntdll/sync.c index 1f7fad8c5e7..72d73bb9e66 100644 --- a/dlls/ntdll/sync.c +++ b/dlls/ntdll/sync.c @@ -682,6 +682,8 @@ static BOOL invoke_apc( const apc_call_t *call, apc_result_t *result ) case APC_ASYNC_IO: NtCurrentTeb()->num_async_io--; call->async_io.func( call->async_io.user, call->async_io.sb, call->async_io.status ); + result->type = call->type; + result->async_io.status = ((IO_STATUS_BLOCK *)call->async_io.sb)->u.Status; break; case APC_VIRTUAL_ALLOC: result->type = call->type; diff --git a/include/wine/server_protocol.h b/include/wine/server_protocol.h index 93087cfc66c..6c172425dd3 100644 --- a/include/wine/server_protocol.h +++ b/include/wine/server_protocol.h @@ -335,6 +335,11 @@ typedef union { enum apc_type type; struct + { + enum apc_type type; + unsigned int status; + } async_io; + struct { enum apc_type type; unsigned int status; @@ -4694,6 +4699,6 @@ union generic_reply struct allocate_locally_unique_id_reply allocate_locally_unique_id_reply; }; -#define SERVER_PROTOCOL_VERSION 281 +#define SERVER_PROTOCOL_VERSION 282 #endif /* __WINE_WINE_SERVER_PROTOCOL_H */ diff --git a/server/protocol.def b/server/protocol.def index d335d0aef79..57e306fe94f 100644 --- a/server/protocol.def +++ b/server/protocol.def @@ -351,6 +351,11 @@ typedef union { enum apc_type type; struct + { + enum apc_type type; /* APC_ASYNC_IO */ + unsigned int status; /* new status of async operation */ + } async_io; + struct { enum apc_type type; /* APC_VIRTUAL_ALLOC */ unsigned int status; /* status returned by call */ diff --git a/server/trace.c b/server/trace.c index b5aab1ae707..659ec28cfbc 100644 --- a/server/trace.c +++ b/server/trace.c @@ -179,6 +179,10 @@ static void dump_apc_result( const apc_result_t *result ) { case APC_NONE: break; + case APC_ASYNC_IO: + fprintf( stderr, "APC_ASYNC_IO,status=%s", + get_status_name( result->async_io.status ) ); + break; case APC_VIRTUAL_ALLOC: fprintf( stderr, "APC_VIRTUAL_ALLOC,status=%s,addr=%p,size=%lu", get_status_name( result->virtual_alloc.status ),