Re: [PATCH 2/3] display: rename display_channel_wait_for_migrate_data

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

 



On Wed, 2015-12-09 at 13:36 +0000, Frediano Ziglio wrote:
> Make it clean this function is handling data and not only checking
> some condition.


^ this should be "clear", not "clean". But I actually prefer the old name.
wait_for_migrate_data() makes it obvious that this function will black and wait
until we recieve the data. the name handle_migrate_data() makes it sound like
that function should only be called after we have recieved the data. In
addition, now that you've renamed the function from the previous patch
(_is_waiting_for_...), this function is less likely to be confusing.


> 
> Signed-off-by: Frediano Ziglio <fziglio@xxxxxxxxxx>
> ---
>  server/display-channel.c | 2 +-
>  server/display-channel.h | 2 +-
>  server/red-worker.c      | 2 +-
>  3 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/server/display-channel.c b/server/display-channel.c
> index 6683efd..6b1043b 100644
> --- a/server/display-channel.c
> +++ b/server/display-channel.c
> @@ -1199,7 +1199,7 @@ void display_channel_process_draw(DisplayChannel
> *display, RedDrawable *red_draw
>      display_channel_drawable_unref(display, drawable);
>  }
>  
> -int display_channel_wait_for_migrate_data(DisplayChannel *display)
> +int display_channel_handle_migrate_data(DisplayChannel *display)
>  {
>      uint64_t end_time = red_get_monotonic_time() +
> DISPLAY_CLIENT_MIGRATE_DATA_TIMEOUT;
>      RedChannel *channel = &display->common.base;
> diff --git a/server/display-channel.h b/server/display-channel.h
> index 7cbc58d..745ca55 100644
> --- a/server/display-channel.h
> +++ b/server/display-channel.h
> @@ -288,7 +288,7 @@ bool                      
>  display_channel_surface_has_canvas        (DisplayCha
>                                                                       
>  uint32_t surface_id);
>  void                       display_channel_current_flush            
>  (DisplayChannel *display,
>                                                                        int
> surface_id);
> -int                        display_channel_wait_for_migrate_data    
>  (DisplayChannel *display);
> +int                        display_channel_handle_migrate_data      
>  (DisplayChannel *display);
>  void                       display_channel_flush_all_surfaces       
>  (DisplayChannel *display);
>  void                      
>  display_channel_free_glz_drawables_to_free(DisplayChannel *display);
>  void                       display_channel_free_glz_drawables       
>  (DisplayChannel *display);
> diff --git a/server/red-worker.c b/server/red-worker.c
> index baa8458..63ee839 100644
> --- a/server/red-worker.c
> +++ b/server/red-worker.c
> @@ -973,7 +973,7 @@ static void handle_dev_start(void *opaque, void *payload)
>      }
>      if (worker->display_channel) {
>          worker->display_channel->common.during_target_migrate = FALSE;
> -        display_channel_wait_for_migrate_data(worker->display_channel);
> +        display_channel_handle_migrate_data(worker->display_channel);
>      }
>      worker->running = TRUE;
>      guest_set_client_capabilities(worker);
_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]