Document the locking assumptions of consumerd-relayd socket passing
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 14 Feb 2018 21:04:33 +0000 (16:04 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 14 Feb 2018 22:58:49 +0000 (17:58 -0500)
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/bin/lttng-sessiond/cmd.c
src/bin/lttng-sessiond/consumer.c

index 1edcffe79ce13552d688638162068f8085016a1a..ffd71bbac5cdb8af69e4d69a9af3f19d47fd2dbd 100644 (file)
@@ -907,6 +907,8 @@ error:
 
 /*
  * Connect to the relayd using URI and send the socket to the right consumer.
+ *
+ * The consumer socket lock must be held by the caller.
  */
 static int send_consumer_relayd_socket(enum lttng_domain_type domain,
                unsigned int session_id, struct lttng_uri *relayd_uri,
@@ -979,6 +981,8 @@ relayd_comm_error:
  * Send both relayd sockets to a specific consumer and domain.  This is a
  * helper function to facilitate sending the information to the consumer for a
  * session.
+ *
+ * The consumer socket lock must be held by the caller.
  */
 static int send_consumer_relayd_sockets(enum lttng_domain_type domain,
                unsigned int session_id, struct consumer_output *consumer,
index ced965dee34aa435828eb7484aa8d058d56bb4d3..5e723e9b3804e08335d3e16758486899ec79f83e 100644 (file)
@@ -992,6 +992,8 @@ error:
 /*
  * Send relayd socket to consumer associated with a session name.
  *
+ * The consumer socket lock must be held by the caller.
+ *
  * On success return positive value. On error, negative value.
  */
 int consumer_send_relayd_socket(struct consumer_socket *consumer_sock,
This page took 0.029233 seconds and 5 git commands to generate.