[prev in list] [next in list] [prev in thread] [next in thread] 

List:       wine-devel
Subject:    Re: I/O Completion Ports (1 of 2)
From:       Alexandre Julliard <julliard () winehq ! com>
Date:       2003-03-28 1:54:36
[Download RAW message or body]

"Robert Shearman" <R.J.Shearman@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@winehq.com


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic