[Spice-devel] [PATCH 16/16] worker: rename process_commands process_display

Frediano Ziglio fziglio at redhat.com
Fri Nov 27 01:28:19 PST 2015


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


Changed:
- reverted function move


diff --git a/server/red_worker.c b/server/red_worker.c
index 5175839..78ed3a2 100644
--- a/server/red_worker.c
+++ b/server/red_worker.c
@@ -87,7 +87,7 @@ struct RedWorker {
     spice_wan_compression_t jpeg_state;
     spice_wan_compression_t zlib_glz_state;
 
-    uint32_t process_commands_generation;
+    uint32_t process_display_generation;
 #ifdef RED_STATISTICS
     StatNodeRef stat;
     uint64_t *wakeup_counter;
@@ -166,14 +166,14 @@ void red_drawable_unref(RedWorker *worker, RedDrawable *red_drawable,
 }
 
 static void red_process_draw(RedWorker *worker, RedDrawable *red_drawable,
-                             uint32_t group_id)
+                                    uint32_t group_id)
 {
     DisplayChannel *display = worker->display_channel;
     Drawable *drawable;
     bool success = FALSE;
 
     drawable = display_channel_drawable_try_new(display, group_id,
-                                                worker->process_commands_generation);
+                                                worker->process_display_generation);
     if (!drawable) {
         return;
     }
@@ -244,7 +244,7 @@ static RedDrawable *red_drawable_new(RedWorker *worker)
     return red;
 }
 
-static int red_process_commands(RedWorker *worker, uint32_t max_pipe_size, int *ring_is_empty)
+static int red_process_display(RedWorker *worker, uint32_t max_pipe_size, int *ring_is_empty)
 {
     QXLCommandExt ext_cmd;
     int n = 0;
@@ -255,7 +255,7 @@ static int red_process_commands(RedWorker *worker, uint32_t max_pipe_size, int *
         return n;
     }
 
-    worker->process_commands_generation++;
+    worker->process_display_generation++;
     *ring_is_empty = FALSE;
     while (!display_is_connected(worker) ||
            // TODO: change to average pipe size?
@@ -386,12 +386,12 @@ static void flush_display_commands(RedWorker *worker)
         uint64_t end_time;
         int ring_is_empty;
 
-        red_process_commands(worker, MAX_PIPE_SIZE, &ring_is_empty);
+        red_process_display(worker, MAX_PIPE_SIZE, &ring_is_empty);
         if (ring_is_empty) {
             break;
         }
 
-        while (red_process_commands(worker, MAX_PIPE_SIZE, &ring_is_empty)) {
+        while (red_process_display(worker, MAX_PIPE_SIZE, &ring_is_empty)) {
             red_channel_push(RED_CHANNEL(worker->display_channel));
         }
 
@@ -1004,7 +1004,7 @@ static void handle_dev_oom(void *opaque, void *payload)
                 display->glz_drawable_count,
                 display->current_size,
                 red_channel_sum_pipes_size(display_red_channel));
-    while (red_process_commands(worker, MAX_PIPE_SIZE, &ring_is_empty)) {
+    while (red_process_display(worker, MAX_PIPE_SIZE, &ring_is_empty)) {
         red_channel_push(display_red_channel);
     }
     if (worker->qxl->st->qif->flush_resources(worker->qxl) == 0) {
@@ -1681,7 +1681,7 @@ SPICE_GNUC_NORETURN static void *red_worker_main(void *arg)
         if (worker->running) {
             int ring_is_empty;
             red_process_cursor(worker, MAX_PIPE_SIZE, &ring_is_empty);
-            red_process_commands(worker, MAX_PIPE_SIZE, &ring_is_empty);
+            red_process_display(worker, MAX_PIPE_SIZE, &ring_is_empty);
         }
         red_push(worker);
     }
-- 
2.4.3



More information about the Spice-devel mailing list