Add channel wakeup fd to monitor close
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 6 Mar 2013 21:12:57 +0000 (16:12 -0500)
committerDavid Goulet <dgoulet@efficios.com>
Wed, 6 Mar 2013 22:51:09 +0000 (17:51 -0500)
Add channel wakeup fd, so consumer can keep its handle on the stream
wakeup_fd (for periodic timer flush), and yet still discover that an
application has closed a channel or exited.

Requires to be updated in locked-step with lttng-ust
"Add channel wakeup fd to monitor close"

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
src/bin/lttng-sessiond/lttng-ust-ctl.h
src/common/ust-consumer/ust-consumer.c

index cd833b826c589f4f59a88ec554a823dfe0cc3e29..7dd36a93cc591d20c2d89764e5e13e57d88f6a7c 100644 (file)
@@ -136,13 +136,21 @@ void ustctl_destroy_channel(struct ustctl_consumer_channel *chan);
 
 int ustctl_send_channel_to_sessiond(int sock,
                struct ustctl_consumer_channel *channel);
+int ustctl_channel_close_wait_fd(struct ustctl_consumer_channel *consumer_chan);
+int ustctl_channel_close_wakeup_fd(struct ustctl_consumer_channel *consumer_chan);
+int ustctl_channel_get_wait_fd(struct ustctl_consumer_channel *consumer_chan);
+int ustctl_channel_get_wakeup_fd(struct ustctl_consumer_channel *consumer_chan);
+
 /*
  * Send a NULL stream to finish iteration over all streams of a given
  * channel.
  */
 int ustctl_send_stream_to_sessiond(int sock,
                struct ustctl_consumer_stream *stream);
+int ustctl_stream_close_wait_fd(struct ustctl_consumer_stream *stream);
 int ustctl_stream_close_wakeup_fd(struct ustctl_consumer_stream *stream);
+int ustctl_stream_get_wait_fd(struct ustctl_consumer_stream *stream);
+int ustctl_stream_get_wakeup_fd(struct ustctl_consumer_stream *stream);
 
 /* Create/destroy stream buffers for read */
 struct ustctl_consumer_stream *
@@ -150,9 +158,6 @@ struct ustctl_consumer_stream *
                        int cpu);
 void ustctl_destroy_stream(struct ustctl_consumer_stream *stream);
 
-int ustctl_get_wait_fd(struct ustctl_consumer_stream *stream);
-int ustctl_get_wakeup_fd(struct ustctl_consumer_stream *stream);
-
 /* For mmap mode, readable without "get" operation */
 int ustctl_get_mmap_len(struct ustctl_consumer_stream *stream,
                unsigned long *len);
index a6a4f1a91735911633a8d85d098e63cd01425417..5d9dc96c7925fd61d1efa44f43637e31df79b9e1 100644 (file)
@@ -256,7 +256,7 @@ static int create_ust_streams(struct lttng_consumer_channel *channel,
        while ((ustream = ustctl_create_stream(channel->uchan, cpu))) {
                int wait_fd;
 
-               wait_fd = ustctl_get_wait_fd(ustream);
+               wait_fd = ustctl_stream_get_wait_fd(ustream);
 
                /* Allocate consumer stream object. */
                stream = allocate_stream(cpu, wait_fd, channel, ctx, &ret);
This page took 0.034338 seconds and 4 git commands to generate.