I/O Completion Ports (1 of 2)

Robert Shearman R.J.Shearman at warwick.ac.uk
Tue Apr 1 15:02:33 CST 2003


I will try to fix this sometime in the next week, depending on whether I
can get CVS access to take advantage of the work Eric Pouech has done.

>>> Alexandre Julliard <julliard at winehq.com> 03/28/03 01:56 AM >>>
"Robert Shearman" <R.J.Shearman at warwick.ac.uk> writes:

> +static int io_completion_send_data( struct thread *thread, void
*cookie, struct io_completion_data * data )
> +{
> +    struct io_completion_send_data_reply reply;
> +    int ret;
> +
> +    reply.cookie   = cookie;
> +    reply.signaled = STATUS_SUCCESS;
> +    reply.bytes_transferred = data->bytes_transferred;
> +    reply.completion_key = data->completion_key;
> +    reply.overlapped = data->overlapped;
> +    if ((ret = write( get_unix_fd( thread->wait_fd ), &reply,
sizeof(reply) )) == sizeof(reply))
> +        return 0;

You cannot send different message sizes into the wait_fd pipe, this
won't work since pipes don't preserve message boundaries. I'd suggest
simply using the normal wait mechanism and then doing a separate call
to retrieve the rest of the info.

-- 
Alexandre Julliard
julliard at winehq.com




More information about the wine-devel mailing list