qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] Re: [PATCH v2 2/2] vnc: threaded VNC server


From: Paolo Bonzini
Subject: [Qemu-devel] Re: [PATCH v2 2/2] vnc: threaded VNC server
Date: Fri, 04 Jun 2010 16:41:19 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9) Gecko/20100430 Fedora/3.0.4-3.fc13 Lightning/1.0b2pre Thunderbird/3.0.4

+    vnc_lock_queue(queue);
+    if (QTAILQ_EMPTY(&queue->jobs)) {
+        qemu_cond_wait(&queue->cond,&queue->mutex);
+    }
+
+    /* If the queue is empty, it's an exit order */
+    if (QTAILQ_EMPTY(&queue->jobs)) {
+        vnc_unlock_queue(queue);
+        return -1;
+    }
+
+    job = QTAILQ_FIRST(&queue->jobs);
+    vnc_unlock_queue(queue);

Wrong usage of condition variables...

+    flush = (job->vs->csock != -1&&  job->vs->abording != true);

and typo still there.

+static void *vnc_worker_thread(void *arg)
+{
+    VncJobQueue *queue = arg;

Also, it's better (future proof) to call qemu_thread_self here.

Thanks!

Paolo



reply via email to

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