Alexandre Julliard : server: Return the status from an async I/
O APC call to the server.
Alexandre Julliard
julliard at wine.codeweavers.com
Wed Mar 21 08:17:00 CDT 2007
Module: wine
Branch: master
Commit: 50975c81f0d595f6b8a683b861a9c4dd5c819c62
URL: http://source.winehq.org/git/wine.git/?a=commit;h=50975c81f0d595f6b8a683b861a9c4dd5c819c62
Author: Alexandre Julliard <julliard at winehq.org>
Date: Tue Mar 20 19:27:10 2007 +0100
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 deletions(-)
diff --git a/dlls/ntdll/sync.c b/dlls/ntdll/sync.c
index 1f7fad8..72d73bb 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 93087cf..6c17242 100644
--- a/include/wine/server_protocol.h
+++ b/include/wine/server_protocol.h
@@ -338,6 +338,11 @@ typedef union
{
enum apc_type type;
unsigned int status;
+ } async_io;
+ struct
+ {
+ enum apc_type type;
+ unsigned int status;
void *addr;
unsigned long size;
} virtual_alloc;
@@ -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 d335d0a..57e306f 100644
--- a/server/protocol.def
+++ b/server/protocol.def
@@ -352,6 +352,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 */
void *addr; /* resulting address */
diff --git a/server/trace.c b/server/trace.c
index b5aab1a..659ec28 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 ),
More information about the wine-cvs
mailing list