qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCHv3] async thread fix - handle EAGAIN/EINTR, remove fp


From: Alon Levy
Subject: [Qemu-devel] [PATCHv3] async thread fix - handle EAGAIN/EINTR, remove fprintf
Date: Wed, 29 Jun 2011 13:57:08 +0200

---
 hw/qxl.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/hw/qxl.c b/hw/qxl.c
index 89e452e..3f84b0c 100644
--- a/hw/qxl.c
+++ b/hw/qxl.c
@@ -1025,13 +1025,15 @@ static void *ioport_write_async(void *arg)
 
     while (true) {
         ret = read(d->aio_pipe[0], &io, sizeof(io));
+        if (ret < 0 && (errno == EAGAIN || errno == EINTR)) {
+            continue;
+        }
         if (ret != sizeof(io)) {
             break;
         }
         io_port = io->port;
         val = io->val;
 
-        fprintf(stderr, "%s: 0x%x\n", __FUNCTION__, io_port);
         switch (io_port) {
         case QXL_IO_UPDATE_AREA_ASYNC:
             qxl_spice_update_area(d, io->update_surface,
-- 
1.7.5.4




reply via email to

[Prev in Thread] Current Thread [Next in Thread]