diff options
author | Vladimir Chtchetkine <vchtchetkine@google.com> | 2011-08-25 08:17:43 -0700 |
---|---|---|
committer | Android Code Review <code-review@android.com> | 2011-08-25 08:17:43 -0700 |
commit | 4ffadf474d07bc3a5f1c9f61a69eef420bcb18a0 (patch) | |
tree | e7db685afc43702513f520c689e267987321d24e | |
parent | 6c13702fee11a40c72e71432c5438fc65602bd5d (diff) | |
parent | fd16505ce923202f0abe74bfe7c3ba110d325ebe (diff) | |
download | external_qemu-4ffadf474d07bc3a5f1c9f61a69eef420bcb18a0.zip external_qemu-4ffadf474d07bc3a5f1c9f61a69eef420bcb18a0.tar.gz external_qemu-4ffadf474d07bc3a5f1c9f61a69eef420bcb18a0.tar.bz2 |
Merge "Fix qemu pipe's 'poll' callbacks"
-rw-r--r-- | android/hw-pipe-net.c | 4 | ||||
-rw-r--r-- | android/hw-qemud.c | 4 | ||||
-rw-r--r-- | hw/goldfish_pipe.c | 12 | ||||
-rw-r--r-- | hw/goldfish_pipe.h | 2 |
4 files changed, 11 insertions, 11 deletions
diff --git a/android/hw-pipe-net.c b/android/hw-pipe-net.c index b3bc6c9..2a09718 100644 --- a/android/hw-pipe-net.c +++ b/android/hw-pipe-net.c @@ -349,9 +349,9 @@ netPipe_poll( void* opaque ) unsigned ret = 0; if (mask & LOOP_IO_READ) - ret |= PIPE_WAKE_READ; + ret |= PIPE_POLL_IN; if (mask & LOOP_IO_WRITE) - ret |= PIPE_WAKE_WRITE; + ret |= PIPE_POLL_OUT; return ret; } diff --git a/android/hw-qemud.c b/android/hw-qemud.c index 7de66e0..44d9dd7 100644 --- a/android/hw-qemud.c +++ b/android/hw-qemud.c @@ -1965,9 +1965,9 @@ _qemudPipe_poll(void* opaque) unsigned ret = 0; if (client != NULL) { - ret |= PIPE_WAKE_WRITE; + ret |= PIPE_POLL_OUT; if (client->ProtocolSelector.Pipe.messages != NULL) { - ret |= PIPE_WAKE_READ; + ret |= PIPE_POLL_IN; } } else { D("%s: Unexpected NULL client", __FUNCTION__); 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 ); |