On 06/23/2011 09:13 PM, Alon Levy wrote:
Hi,
+static _inline void async_io(PDev *pdev, PUCHAR async, PUCHAR sync, UCHAR val)
Instead of two parameters, one for async and one for sync, I prefer one parameter - an enum for the action, and then async_io can choose the right port.
+{
+    if (pdev->pci_revision>= QXL_REVISION_STABLE_V10) {
+        WRITE_PORT_UCHAR(async, val);
+        WAIT_FOR_EVENT(pdev, pdev->io_cmd_event, NULL);
+        DEBUG_PRINT((pdev, 3, "finished async %d\n", (int)async));
I think that the writing to the async port and the waiting should be protected by a semaphore (what happens when two threads wait for the same io_cmd_event, but for different async calls).
+    } else {
+        WRITE_PORT_UCHAR(sync, val);
+    }
+}
+
      }

+    if ((status = VideoPortCreateEvent(dev_ext, 0, NULL,&io_cmd_event)) != 
NO_ERROR) {
:g> + DEBUG_PRINT((dev_ext, 0, "%s: create cursor event failed %lu\n",
message is incorrect
+                     __FUNCTION__, status));
_______________________________________________
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel

Reply via email to