"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.