Re: [PATCH 04/11] channel: rename misleading functions

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

 



I think add_tail_AND_push() might be even more clear?

Up to you.


On Tue, 2016-02-09 at 10:27 +0000, Frediano Ziglio wrote:
> Signed-off-by: Frediano Ziglio <fziglio@xxxxxxxxxx>
> ---
>  server/cache-item.tmpl.c | 2 +-
>  server/dcc.c             | 2 +-
>  server/red-channel.c     | 6 +++---
>  server/red-channel.h     | 2 +-
>  4 files changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/server/cache-item.tmpl.c b/server/cache-item.tmpl.c
> index 09add79..460e1f9 100644
> --- a/server/cache-item.tmpl.c
> +++ b/server/cache-item.tmpl.c
> @@ -83,7 +83,7 @@ static void FUNC_NAME(remove)(CHANNELCLIENT *channel_client,
> CacheItem *item)
>      channel_client->VAR_NAME(available) += item->size;
>  
>      red_channel_pipe_item_init(&channel->common.base, &item->u.pipe_data,
> PIPE_ITEM_TYPE_INVAL_ONE);
> -    red_channel_client_pipe_add_tail(&channel_client->common.base, &item
> ->u.pipe_data); // for now
> +    red_channel_client_pipe_add_tail_push(&channel_client->common.base, &item
> ->u.pipe_data); // for now
>  }
>  
>  static int FUNC_NAME(add)(CHANNELCLIENT *channel_client, uint64_t id, size_t
> size)
> diff --git a/server/dcc.c b/server/dcc.c
> index bf692f8..8fe7fc3 100644
> --- a/server/dcc.c
> +++ b/server/dcc.c
> @@ -325,7 +325,7 @@ void dcc_append_drawable(DisplayChannelClient *dcc,
> Drawable *drawable)
>      DrawablePipeItem *dpi = drawable_pipe_item_new(dcc, drawable);
>  
>      add_drawable_surface_images(dcc, drawable);
> -    red_channel_client_pipe_add_tail(RED_CHANNEL_CLIENT(dcc), &dpi
> ->dpi_pipe_item);
> +    red_channel_client_pipe_add_tail_push(RED_CHANNEL_CLIENT(dcc), &dpi
> ->dpi_pipe_item);
>  }
>  
>  void dcc_add_drawable_after(DisplayChannelClient *dcc, Drawable *drawable,
> PipeItem *pos)
> diff --git a/server/red-channel.c b/server/red-channel.c
> index 4bc2faa..9cfc88f 100644
> --- a/server/red-channel.c
> +++ b/server/red-channel.c
> @@ -1707,13 +1707,13 @@ int
> red_channel_client_pipe_item_is_linked(RedChannelClient *rcc,
>      return ring_item_is_linked(&item->link);
>  }
>  
> -void red_channel_client_pipe_add_tail_no_push(RedChannelClient *rcc,
> +void red_channel_client_pipe_add_tail(RedChannelClient *rcc,

While we're at it, shall we make this static? Or maybe in a different commit.

>                                                PipeItem *item)
>  {
>      client_pipe_add(rcc, item, rcc->pipe.prev);
>  }
>  
> -void red_channel_client_pipe_add_tail(RedChannelClient *rcc, PipeItem *item)
> +void red_channel_client_pipe_add_tail_push(RedChannelClient *rcc, PipeItem
> *item)
>  {
>      if (client_pipe_add(rcc, item, rcc->pipe.prev)) {
>          red_channel_client_push(rcc);
> @@ -2284,7 +2284,7 @@ void red_channel_pipes_new_add(RedChannel *channel,
> new_pipe_item_t creator, voi
>  void red_channel_pipes_new_add_tail(RedChannel *channel, new_pipe_item_t
> creator, void *data)
>  {
>      red_channel_pipes_create_batch(channel, creator, data,
> -                                    
>  red_channel_client_pipe_add_tail_no_push);
> +                                     red_channel_client_pipe_add_tail);
>  }
>  
>  uint32_t red_channel_max_pipe_size(RedChannel *channel)
> diff --git a/server/red-channel.h b/server/red-channel.h
> index 791bc5b..355fa80 100644
> --- a/server/red-channel.h
> +++ b/server/red-channel.h
> @@ -487,7 +487,7 @@ void red_channel_client_pipe_add(RedChannelClient *rcc,
> PipeItem *item);
>  void red_channel_client_pipe_add_after(RedChannelClient *rcc, PipeItem *item,
> PipeItem *pos);
>  int red_channel_client_pipe_item_is_linked(RedChannelClient *rcc, PipeItem
> *item);
>  void red_channel_client_pipe_remove_and_release(RedChannelClient *rcc,
> PipeItem *item);
> -void red_channel_client_pipe_add_tail(RedChannelClient *rcc, PipeItem *item);
> +void red_channel_client_pipe_add_tail_push(RedChannelClient *rcc, PipeItem
> *item);
>  /* for types that use this routine -> the pipe item should be freed */
>  void red_channel_client_pipe_add_type(RedChannelClient *rcc, int
> pipe_item_type);
>  void red_channel_pipes_add_type(RedChannel *channel, int pipe_item_type);



Acked-by: Jonathon Jongsma <jjongsma@xxxxxxxxxx>
_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://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]