Commit 5c0e2965 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

server: Use stored APC in async_set_result.

parent 28c33903
......@@ -191,7 +191,7 @@ void async_terminate( struct async *async, unsigned int status )
data.async_io.status = status;
thread_queue_apc( async->thread, &async->obj, &data );
}
else async_set_result( &async->obj, STATUS_SUCCESS, 0, 0, 0 );
else async_set_result( &async->obj, STATUS_SUCCESS, 0 );
async_reselect( async );
if (async->queue) release_object( async ); /* so that it gets destroyed when the async is done */
......@@ -300,8 +300,7 @@ static void add_async_completion( struct async_queue *queue, apc_param_t cvalue,
}
/* store the result of the client-side async callback */
void async_set_result( struct object *obj, unsigned int status, apc_param_t total,
client_ptr_t apc, client_ptr_t apc_arg )
void async_set_result( struct object *obj, unsigned int status, apc_param_t total )
{
struct async *async = (struct async *)obj;
......@@ -329,13 +328,13 @@ void async_set_result( struct object *obj, unsigned int status, apc_param_t tota
if (async->queue && !async->data.apc && async->data.apc_context)
add_async_completion( async->queue, async->data.apc_context, status, total );
if (apc)
if (async->data.apc)
{
apc_call_t data;
memset( &data, 0, sizeof(data) );
data.type = APC_USER;
data.user.func = apc;
data.user.args[0] = apc_arg;
data.user.func = async->data.apc;
data.user.args[0] = async->data.apc_context;
data.user.args[1] = async->data.iosb;
data.user.args[2] = 0;
thread_queue_apc( async->thread, NULL, &data );
......
......@@ -178,8 +178,7 @@ extern void free_async_queue( struct async_queue *queue );
extern struct async *create_async( struct thread *thread, const async_data_t *data, struct iosb *iosb );
extern void queue_async( struct async_queue *queue, struct async *async );
extern void async_set_timeout( struct async *async, timeout_t timeout, unsigned int status );
extern void async_set_result( struct object *obj, unsigned int status,
apc_param_t total, client_ptr_t apc, client_ptr_t apc_arg );
extern void async_set_result( struct object *obj, unsigned int status, apc_param_t total );
extern int async_queued( struct async_queue *queue );
extern int async_waiting( struct async_queue *queue );
extern void async_terminate( struct async *async, unsigned int status );
......
......@@ -1484,8 +1484,7 @@ DECL_HANDLER(select)
else if (apc->result.type == APC_ASYNC_IO)
{
if (apc->owner)
async_set_result( apc->owner, apc->result.async_io.status, apc->result.async_io.total,
apc->result.async_io.apc, apc->result.async_io.arg );
async_set_result( apc->owner, apc->result.async_io.status, apc->result.async_io.total );
}
wake_up( &apc->obj, 0 );
close_handle( current->process, req->prev_apc );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment