[Spice-devel] [PATCH 08/23] server/red_channel: add red_channel_pipe_add_after (from red_worker)
Alon Levy
alevy at redhat.com
Mon Feb 7 09:31:10 PST 2011
---
server/red_channel.c | 10 ++++++++++
server/red_channel.h | 1 +
2 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/server/red_channel.c b/server/red_channel.c
index b367f0f..ebb181c 100644
--- a/server/red_channel.c
+++ b/server/red_channel.c
@@ -520,6 +520,16 @@ void red_channel_pipe_add_push(RedChannel *channel, PipeItem *item)
red_channel_push(channel);
}
+void red_channel_pipe_add_after(RedChannel *channel, PipeItem *item, PipeItem *pos)
+{
+ ASSERT(channel);
+ ASSERT(pos);
+ ASSERT(item);
+
+ channel->pipe_size++;
+ ring_add_after(&item->link, &pos->link);
+}
+
int red_channel_pipe_item_is_linked(RedChannel *channel, PipeItem *item)
{
return ring_item_is_linked(&item->link);
diff --git a/server/red_channel.h b/server/red_channel.h
index 0a113fc..7c973fd 100644
--- a/server/red_channel.h
+++ b/server/red_channel.h
@@ -216,6 +216,7 @@ void red_channel_begin_send_message(RedChannel *channel);
void red_channel_pipe_item_init(RedChannel *channel, PipeItem *item, int type);
void red_channel_pipe_add_push(RedChannel *channel, PipeItem *item);
void red_channel_pipe_add(RedChannel *channel, PipeItem *item);
+void red_channel_pipe_add_after(RedChannel *channel, PipeItem *item, PipeItem *pos);
int red_channel_pipe_item_is_linked(RedChannel *channel, PipeItem *item);
void red_channel_pipe_item_remove(RedChannel *channel, PipeItem *item);
void red_channel_pipe_add_tail(RedChannel *channel, PipeItem *item);
--
1.7.4
More information about the Spice-devel
mailing list