projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Updating lttng-ust-ctl header file
[lttng-tools.git]
/
src
/
bin
/
lttng-sessiond
/
consumer.c
diff --git
a/src/bin/lttng-sessiond/consumer.c
b/src/bin/lttng-sessiond/consumer.c
index 25194460645d377ad5d0680417629f1f69d2f40b..5cbd42f6301d327abefdb159541dc7f651983e9d 100644
(file)
--- a/
src/bin/lttng-sessiond/consumer.c
+++ b/
src/bin/lttng-sessiond/consumer.c
@@
-731,6
+731,8
@@
error:
/*
* Send file descriptor to consumer via sock.
/*
* 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)
{
*/
int consumer_send_fds(struct consumer_socket *sock, int *fds, size_t nb_fd)
{
@@
-755,6
+757,8
@@
error:
/*
* Consumer send communication message structure to consumer.
/*
* 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)
*/
int consumer_send_msg(struct consumer_socket *sock,
struct lttcomm_consumer_msg *msg)
@@
-778,6
+782,8
@@
error:
/*
* Consumer send channel communication message structure to consumer.
/*
* 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)
*/
int consumer_send_channel(struct consumer_socket *sock,
struct lttcomm_consumer_msg *msg)
@@
-1442,7
+1448,9
@@
int consumer_snapshot_channel(struct consumer_socket *socket, uint64_t key,
}
health_code_update();
}
health_code_update();
+ pthread_mutex_lock(socket->lock);
ret = consumer_send_msg(socket, &msg);
ret = consumer_send_msg(socket, &msg);
+ pthread_mutex_unlock(socket->lock);
if (ret < 0) {
goto error;
}
if (ret < 0) {
goto error;
}
This page took
0.025157 seconds
and
4
git commands to generate.