Document consumer socket locking assumptions
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 14 Feb 2018 22:44:05 +0000 (17:44 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 15 Feb 2018 20:14:03 +0000 (15:14 -0500)
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/bin/lttng-sessiond/consumer.c
src/bin/lttng-sessiond/kernel-consumer.c

index cad1587d25bb3a85569be4c605f157a155981954..960fe8e46439a6447c17198f0732c08b507bee4a 100644 (file)
@@ -731,6 +731,8 @@ error:
 
 /*
  * Send file descriptor to consumer via sock.
+ *
+ * The consumer socket lock must be held by the caller.
  */
 int consumer_send_fds(struct consumer_socket *sock, int *fds, size_t nb_fd)
 {
@@ -756,6 +758,8 @@ error:
 
 /*
  * Consumer send communication message structure to consumer.
+ *
+ * The consumer socket lock must be held by the caller.
  */
 int consumer_send_msg(struct consumer_socket *sock,
                struct lttcomm_consumer_msg *msg)
@@ -779,6 +783,8 @@ error:
 
 /*
  * Consumer send channel communication message structure to consumer.
+ *
+ * The consumer socket lock must be held by the caller.
  */
 int consumer_send_channel(struct consumer_socket *sock,
                struct lttcomm_consumer_msg *msg)
index 3649374efb0ae38cf6f1685df734abe7f6d28d88..d21b1868aaf924e9199b8ad28bff846061d4dff2 100644 (file)
@@ -150,6 +150,8 @@ error:
 
 /*
  * Sending metadata to the consumer with command ADD_CHANNEL and ADD_STREAM.
+ *
+ * The consumer socket lock must be held by the caller.
  */
 int kernel_consumer_add_metadata(struct consumer_socket *sock,
                struct ltt_kernel_session *session, unsigned int monitor)
@@ -308,6 +310,8 @@ error:
 
 /*
  * Send all stream fds of kernel channel to the consumer.
+ *
+ * The consumer socket lock must be held by the caller.
  */
 int kernel_consumer_send_channel_stream(struct consumer_socket *sock,
                struct ltt_kernel_channel *channel, struct ltt_kernel_session *session,
@@ -360,6 +364,8 @@ error:
 
 /*
  * Send all stream fds of the kernel session to the consumer.
+ *
+ * The consumer socket lock must be held by the caller.
  */
 int kernel_consumer_send_session(struct consumer_socket *sock,
                struct ltt_kernel_session *session)
This page took 0.029313 seconds and 5 git commands to generate.