server/red_worker: drop red_pipe_add_tail, use red_channel_pipe_add_tail

The only difference between them being that the later also does a push.
I don't believe that to be a problem, but if it does I can always introduce
a push'less version.
This commit is contained in:
Alon Levy 2011-03-24 18:17:17 +02:00
parent 8fbc41b717
commit 75b6a305ff
2 changed files with 2 additions and 9 deletions

View File

@ -74,7 +74,7 @@ static void FUNC_NAME(remove)(CHANNEL *channel, CacheItem *item)
channel->VAR_NAME(available) += item->size;
red_channel_pipe_item_init(&channel->common.base, &item->u.pipe_data, PIPE_ITEM_TYPE_INVAL_ONE);
red_pipe_add_tail(&channel->common.base, &item->u.pipe_data); // for now
red_channel_pipe_add_tail(&channel->common.base, &item->u.pipe_data); // for now
}
static int FUNC_NAME(add)(CHANNEL *channel, uint64_t id, size_t size)

View File

@ -1134,13 +1134,6 @@ static inline void pipe_item_remove(PipeItem *item)
ring_remove(&item->link);
}
static inline void red_pipe_add_tail(RedChannel *channel, PipeItem *item)
{
ASSERT(channel);
channel->pipe_size++;
ring_add_before(&item->link, &channel->pipe);
}
static void red_pipe_add_verb(RedChannel* channel, uint16_t verb)
{
VerbItem *item = spice_new(VerbItem, 1);
@ -1198,7 +1191,7 @@ static inline void red_pipe_add_drawable_to_tail(RedWorker *worker, Drawable *dr
}
red_handle_drawable_surfaces_client_synced(worker, drawable);
drawable->refs++;
red_pipe_add_tail(&worker->display_channel->common.base, &drawable->pipe_item);
red_channel_pipe_add_tail(&worker->display_channel->common.base, &drawable->pipe_item);
}
static inline void red_pipe_add_drawable_after(RedWorker *worker, Drawable *drawable,