diff options
author | Yonit Halperin <yhalperi@redhat.com> | 2013-09-11 13:31:21 -0400 |
---|---|---|
committer | Yonit Halperin <yhalperi@redhat.com> | 2013-09-26 10:48:40 -0400 |
commit | bcf9e64f134a6073c1e404efc8892c1cb453bd8a (patch) | |
tree | 1931266e78b271f5e55c8a16c3e08e25023bd9e9 /server/red_channel.h | |
parent | 6c2ff9864d32199424245b3ca41c201aa2f387b3 (diff) | |
download | spice-bcf9e64f134a6073c1e404efc8892c1cb453bd8a.tar.gz spice-bcf9e64f134a6073c1e404efc8892c1cb453bd8a.tar.xz spice-bcf9e64f134a6073c1e404efc8892c1cb453bd8a.zip |
red_channel: cleanup of red_channel_client blocking methods
(1) receive timeout as a parameter.
(2) add a return value and pass the handling
of failures to the calling routine.
Diffstat (limited to 'server/red_channel.h')
-rw-r--r-- | server/red_channel.h | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/server/red_channel.h b/server/red_channel.h index 676e1ef5..9e54dcec 100644 --- a/server/red_channel.h +++ b/server/red_channel.h @@ -612,14 +612,20 @@ int red_client_during_migrate_at_target(RedClient *client); void red_client_migrate(RedClient *client); -/* blocking function */ -void red_channel_client_wait_pipe_item_sent(RedChannelClient *rcc, - PipeItem *item); - -/* blocking function */ -void red_wait_outgoing_item(RedChannelClient *rcc); +/* + * blocking functions. + * + * timeout is in nano sec. -1 for no timeout. + * + * Return: TRUE if waiting succeeded. FALSE if timeout expired. + */ -/* blocking function */ -void red_channel_wait_all_sent(RedChannel *channel); +int red_channel_client_wait_pipe_item_sent(RedChannelClient *rcc, + PipeItem *item, + int64_t timeout); +int red_channel_client_wait_outgoing_item(RedChannelClient *rcc, + int64_t timeout); +int red_channel_wait_all_sent(RedChannel *channel, + int64_t timeout); #endif |