I/O Completion Ports (1 of 2)
Alexandre Julliard
julliard at winehq.com
Thu Mar 27 19:54:36 CST 2003
"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