[Spice-commits] server/red_worker.c

Frediano Ziglio fziglio at kemper.freedesktop.org
Mon Nov 2 01:47:59 PST 2015


 server/red_worker.c |   24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)

New commits:
commit 9e42647101ef3683a3318ba2baaae7e4edd58baf
Author: Marc-André Lureau <marcandre.lureau at gmail.com>
Date:   Fri Sep 13 20:52:31 2013 +0200

    worker: s/repoll/poll_tries
    
    Acked-by: Frediano Ziglio <fziglio at redhat.com>

diff --git a/server/red_worker.c b/server/red_worker.c
index fb1d69e..68cb153 100644
--- a/server/red_worker.c
+++ b/server/red_worker.c
@@ -576,10 +576,10 @@ typedef struct RedWorker {
     unsigned int event_timeout;
 
     DisplayChannel *display_channel;
-    uint32_t repoll_cmd_ring;
+    uint32_t display_poll_tries;
 
     CursorChannel *cursor_channel;
-    uint32_t repoll_cursor_ring;
+    uint32_t cursor_poll_tries;
 
     uint32_t num_renderers;
     uint32_t renderers[RED_RENDERER_LAST];
@@ -4160,19 +4160,19 @@ static int red_process_cursor(RedWorker *worker, uint32_t max_pipe_size, int *ri
            red_channel_min_pipe_size(&worker->cursor_channel->common.base) <= max_pipe_size) {
         if (!worker->qxl->st->qif->get_cursor_command(worker->qxl, &ext_cmd)) {
             *ring_is_empty = TRUE;
-            if (worker->repoll_cursor_ring < CMD_RING_POLL_RETRIES) {
-                worker->repoll_cursor_ring++;
+            if (worker->cursor_poll_tries < CMD_RING_POLL_RETRIES) {
+                worker->cursor_poll_tries++;
                 worker->event_timeout = MIN(worker->event_timeout, CMD_RING_POLL_TIMEOUT);
                 return n;
             }
-            if (worker->repoll_cursor_ring > CMD_RING_POLL_RETRIES ||
+            if (worker->cursor_poll_tries > CMD_RING_POLL_RETRIES ||
                 worker->qxl->st->qif->req_cursor_notification(worker->qxl)) {
-                worker->repoll_cursor_ring++;
+                worker->cursor_poll_tries++;
                 return n;
             }
             continue;
         }
-        worker->repoll_cursor_ring = 0;
+        worker->cursor_poll_tries = 0;
         switch (ext_cmd.cmd.type) {
         case QXL_CMD_CURSOR: {
             RedCursorCmd *cursor = spice_new0(RedCursorCmd, 1);
@@ -4222,14 +4222,14 @@ static int red_process_commands(RedWorker *worker, uint32_t max_pipe_size, int *
            red_channel_min_pipe_size(&worker->display_channel->common.base) <= max_pipe_size) {
         if (!worker->qxl->st->qif->get_command(worker->qxl, &ext_cmd)) {
             *ring_is_empty = TRUE;;
-            if (worker->repoll_cmd_ring < CMD_RING_POLL_RETRIES) {
-                worker->repoll_cmd_ring++;
+            if (worker->display_poll_tries < CMD_RING_POLL_RETRIES) {
+                worker->display_poll_tries++;
                 worker->event_timeout = MIN(worker->event_timeout, CMD_RING_POLL_TIMEOUT);
                 return n;
             }
-            if (worker->repoll_cmd_ring > CMD_RING_POLL_RETRIES ||
+            if (worker->display_poll_tries > CMD_RING_POLL_RETRIES ||
                          worker->qxl->st->qif->req_cmd_notification(worker->qxl)) {
-                worker->repoll_cmd_ring++;
+                worker->display_poll_tries++;
                 return n;
             }
             continue;
@@ -4240,7 +4240,7 @@ static int red_process_commands(RedWorker *worker, uint32_t max_pipe_size, int *
                                    stat_now(worker));
 
         stat_inc_counter(worker->command_counter, 1);
-        worker->repoll_cmd_ring = 0;
+        worker->display_poll_tries = 0;
         switch (ext_cmd.cmd.type) {
         case QXL_CMD_DRAW: {
             RedDrawable *red_drawable = red_drawable_new(worker); // returns with 1 ref


More information about the Spice-commits mailing list