From fd16505ce923202f0abe74bfe7c3ba110d325ebe Mon Sep 17 00:00:00 2001 From: Vladimir Chtchetkine Date: Thu, 25 Aug 2011 08:06:26 -0700 Subject: Fix qemu pipe's 'poll' callbacks Throughout emulator's code pipe's 'poll' callback was returning PIPE_WAKE_XXX, instead of PIPE_POLL_XXX flags. This created whole sort of issues with the qemu pipe service <-> client communications. This is also a fix for http://b/issue?id=5196348 Change-Id: I92202cf4ef4554559eb022c4410ee93923edec1b --- hw/goldfish_pipe.c | 12 ++++++------ hw/goldfish_pipe.h | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'hw') diff --git a/hw/goldfish_pipe.c b/hw/goldfish_pipe.c index b46a8b8..2227093 100644 --- a/hw/goldfish_pipe.c +++ b/hw/goldfish_pipe.c @@ -323,7 +323,7 @@ pipeConnector_recvBuffers( void* opaque, GoldfishPipeBuffer* buffers, int numBuf static unsigned pipeConnector_poll( void* opaque ) { - return PIPE_WAKE_WRITE; + return PIPE_POLL_OUT; } static void @@ -406,7 +406,7 @@ zeroPipe_recvBuffers( void* opaque, GoldfishPipeBuffer* buffers, int numBuffers static unsigned zeroPipe_poll( void* opaque ) { - return PIPE_WAKE_READ | PIPE_WAKE_WRITE; + return PIPE_POLL_IN | PIPE_POLL_OUT; } static void @@ -597,10 +597,10 @@ pingPongPipe_poll( void* opaque ) unsigned ret = 0; if (pipe->count < pipe->size) - ret |= PIPE_WAKE_WRITE; + ret |= PIPE_POLL_OUT; if (pipe->count > 0) - ret |= PIPE_WAKE_READ; + ret |= PIPE_POLL_IN; return ret; } @@ -768,10 +768,10 @@ throttlePipe_poll( void* opaque ) unsigned ret = pingPongPipe_poll(&pipe->pingpong); if (pipe->sendExpiration > 0) - ret &= ~PIPE_WAKE_WRITE; + ret &= ~PIPE_POLL_OUT; if (pipe->recvExpiration > 0) - ret &= ~PIPE_WAKE_READ; + ret &= ~PIPE_POLL_IN; return ret; } diff --git a/hw/goldfish_pipe.h b/hw/goldfish_pipe.h index be5c449..8074619 100644 --- a/hw/goldfish_pipe.h +++ b/hw/goldfish_pipe.h @@ -85,7 +85,7 @@ typedef struct { int (*recvBuffers)( void* pipe, GoldfishPipeBuffer* buffers, int numBuffers ); /* Called when guest wants to poll the read/write status for the pipe. - * Should return a combination of PIPE_WAKE_XXX flags. + * Should return a combination of PIPE_POLL_XXX flags. */ unsigned (*poll)( void* pipe ); -- cgit v1.1