Alexandre Julliard : server: Make apc_param_t always 64-bit.

Alexandre Julliard julliard at winehq.org
Thu Dec 18 08:08:34 CST 2008


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

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Wed Dec 17 19:43:40 2008 +0100

server: Make apc_param_t always 64-bit.

---

 include/wine/server_protocol.h |    4 ++--
 server/async.c                 |    4 ++--
 server/protocol.def            |    2 +-
 server/trace.c                 |   32 ++++++++++++++++++++++++--------
 tools/make_requests            |    4 ++--
 5 files changed, 31 insertions(+), 15 deletions(-)

diff --git a/include/wine/server_protocol.h b/include/wine/server_protocol.h
index a8b4f0a..e2166ae 100644
--- a/include/wine/server_protocol.h
+++ b/include/wine/server_protocol.h
@@ -23,7 +23,7 @@ typedef unsigned int thread_id_t;
 typedef unsigned int data_size_t;
 typedef unsigned int ioctl_code_t;
 typedef unsigned long lparam_t;
-typedef unsigned long apc_param_t;
+typedef unsigned __int64 apc_param_t;
 typedef unsigned __int64 mem_size_t;
 typedef unsigned __int64 file_pos_t;
 
@@ -5049,6 +5049,6 @@ union generic_reply
     struct set_window_layered_info_reply set_window_layered_info_reply;
 };
 
-#define SERVER_PROTOCOL_VERSION 350
+#define SERVER_PROTOCOL_VERSION 351
 
 #endif /* __WINE_WINE_SERVER_PROTOCOL_H */
diff --git a/server/async.c b/server/async.c
index 6dea6bc..f3186d7 100644
--- a/server/async.c
+++ b/server/async.c
@@ -266,8 +266,8 @@ void async_set_result( struct object *obj, unsigned int status, unsigned int tot
             memset( &data, 0, sizeof(data) );
             data.type         = APC_USER;
             data.user.func    = async->data.apc;
-            data.user.args[0] = (apc_param_t)async->data.arg;
-            data.user.args[1] = (apc_param_t)async->data.iosb;
+            data.user.args[0] = (apc_param_t)(unsigned long)async->data.arg;
+            data.user.args[1] = (apc_param_t)(unsigned long)async->data.iosb;
             data.user.args[2] = 0;
             thread_queue_apc( async->thread, NULL, &data );
         }
diff --git a/server/protocol.def b/server/protocol.def
index 7df2d42..e80d302 100644
--- a/server/protocol.def
+++ b/server/protocol.def
@@ -39,7 +39,7 @@ typedef unsigned int thread_id_t;
 typedef unsigned int data_size_t;
 typedef unsigned int ioctl_code_t;
 typedef unsigned long lparam_t;
-typedef unsigned long apc_param_t;
+typedef unsigned __int64 apc_param_t;
 typedef unsigned __int64 mem_size_t;
 typedef unsigned __int64 file_pos_t;
 
diff --git a/server/trace.c b/server/trace.c
index 59658e9..c446f63 100644
--- a/server/trace.c
+++ b/server/trace.c
@@ -114,8 +114,13 @@ static void dump_apc_call( const apc_call_t *call )
         fprintf( stderr, "APC_NONE" );
         break;
     case APC_USER:
-        fprintf( stderr, "APC_USER,args={%lx,%lx,%lx}",
-                 call->user.args[0], call->user.args[1], call->user.args[2] );
+        fprintf( stderr, "APC_USER,args={" );
+        dump_uint64( &call->user.args[0] );
+        fputc( ',', stderr );
+        dump_uint64( &call->user.args[1] );
+        fputc( ',', stderr );
+        dump_uint64( &call->user.args[2] );
+        fputc( '}', stderr );
         break;
     case APC_TIMER:
         fprintf( stderr, "APC_TIMER,time=" );
@@ -3753,8 +3758,12 @@ static void dump_open_completion_reply( const struct open_completion_reply *req
 static void dump_add_completion_request( const struct add_completion_request *req )
 {
     fprintf( stderr, " handle=%04x,", req->handle );
-    fprintf( stderr, " ckey=%lx,", req->ckey );
-    fprintf( stderr, " cvalue=%lx,", req->cvalue );
+    fprintf( stderr, " ckey=" );
+    dump_uint64( &req->ckey );
+    fprintf( stderr, "," );
+    fprintf( stderr, " cvalue=" );
+    dump_uint64( &req->cvalue );
+    fprintf( stderr, "," );
     fprintf( stderr, " information=%08x,", req->information );
     fprintf( stderr, " status=%08x", req->status );
 }
@@ -3766,8 +3775,12 @@ static void dump_remove_completion_request( const struct remove_completion_reque
 
 static void dump_remove_completion_reply( const struct remove_completion_reply *req )
 {
-    fprintf( stderr, " ckey=%lx,", req->ckey );
-    fprintf( stderr, " cvalue=%lx,", req->cvalue );
+    fprintf( stderr, " ckey=" );
+    dump_uint64( &req->ckey );
+    fprintf( stderr, "," );
+    fprintf( stderr, " cvalue=" );
+    dump_uint64( &req->cvalue );
+    fprintf( stderr, "," );
     fprintf( stderr, " information=%08x,", req->information );
     fprintf( stderr, " status=%08x", req->status );
 }
@@ -3786,13 +3799,16 @@ static void dump_set_completion_info_request( const struct set_completion_info_r
 {
     fprintf( stderr, " handle=%04x,", req->handle );
     fprintf( stderr, " chandle=%04x,", req->chandle );
-    fprintf( stderr, " ckey=%lx", req->ckey );
+    fprintf( stderr, " ckey=" );
+    dump_uint64( &req->ckey );
 }
 
 static void dump_add_fd_completion_request( const struct add_fd_completion_request *req )
 {
     fprintf( stderr, " handle=%04x,", req->handle );
-    fprintf( stderr, " cvalue=%lx,", req->cvalue );
+    fprintf( stderr, " cvalue=" );
+    dump_uint64( &req->cvalue );
+    fprintf( stderr, "," );
     fprintf( stderr, " status=%08x,", req->status );
     fprintf( stderr, " information=%08x", req->information );
 }
diff --git a/tools/make_requests b/tools/make_requests
index a89bc7f..d21d79d 100755
--- a/tools/make_requests
+++ b/tools/make_requests
@@ -37,7 +37,7 @@ my %formats =
     "process_id_t"  => [  4,   4,  "%04x" ],
     "thread_id_t"   => [  4,   4,  "%04x" ],
     "lparam_t"      => [  4,   4,  "%lx" ],
-    "apc_param_t"   => [  4,   4,  "%lx" ],
+    "apc_param_t"   => [  8,   8,  "&dump_uint64" ],
     "file_pos_t"    => [  8,   8,  "&dump_uint64" ],
     "mem_size_t"    => [  8,   8,  "&dump_uint64" ],
     "timeout_t"     => [  8,   8,  "&dump_timeout" ],
@@ -45,7 +45,7 @@ my %formats =
     "char_info_t"   => [  4,   2,  "&dump_char_info" ],
     "apc_call_t"    => [  40,  8,  "&dump_apc_call" ],
     "apc_result_t"  => [  40,  8,  "&dump_apc_result" ],
-    "async_data_t"  => [  24,  4,  "&dump_async_data" ],
+    "async_data_t"  => [  28,  8,  "&dump_async_data" ],
     "luid_t"        => [  8,   4,  "&dump_luid" ],
     "ioctl_code_t"  => [  4,   4,  "&dump_ioctl_code" ],
 );




More information about the wine-cvs mailing list