projects
/
lttng-ust.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add "2x int" and "2x long" types to the Java interface
[lttng-ust.git]
/
liblttng-ust
/
lttng-ust-comm.c
diff --git
a/liblttng-ust/lttng-ust-comm.c
b/liblttng-ust/lttng-ust-comm.c
index 36f57efb25f4d97c31bcb04b7fd207f2807b9a8c..0765c9b538a6a9370570647fea6780fe49070705 100644
(file)
--- a/
liblttng-ust/lttng-ust-comm.c
+++ b/
liblttng-ust/lttng-ust-comm.c
@@
-46,6
+46,7
@@
#include "tracepoint-internal.h"
#include "ltt-tracer-core.h"
#include "compat.h"
#include "tracepoint-internal.h"
#include "ltt-tracer-core.h"
#include "compat.h"
+#include "../libringbuffer/tlsfixup.h"
/*
* Has lttng ust comm constructor been called ?
/*
* Has lttng ust comm constructor been called ?
@@
-319,14
+320,20
@@
end:
|| lum->cmd == LTTNG_UST_CHANNEL
|| lum->cmd == LTTNG_UST_METADATA)
&& lur.ret_code == USTCOMM_OK) {
|| lum->cmd == LTTNG_UST_CHANNEL
|| lum->cmd == LTTNG_UST_METADATA)
&& lur.ret_code == USTCOMM_OK) {
+ int sendret = 0;
+
/* we also need to send the file descriptors. */
ret = ustcomm_send_fds_unix_sock(sock,
&shm_fd, &shm_fd,
1, sizeof(int));
if (ret < 0) {
perror("send shm_fd");
/* we also need to send the file descriptors. */
ret = ustcomm_send_fds_unix_sock(sock,
&shm_fd, &shm_fd,
1, sizeof(int));
if (ret < 0) {
perror("send shm_fd");
-
goto error
;
+
sendret = ret
;
}
}
+ /*
+ * The sessiond expects 2 file descriptors, even upon
+ * error.
+ */
ret = ustcomm_send_fds_unix_sock(sock,
&wait_fd, &wait_fd,
1, sizeof(int));
ret = ustcomm_send_fds_unix_sock(sock,
&wait_fd, &wait_fd,
1, sizeof(int));
@@
-334,6
+341,10
@@
end:
perror("send wait_fd");
goto error;
}
perror("send wait_fd");
goto error;
}
+ if (sendret) {
+ ret = sendret;
+ goto error;
+ }
}
/*
* We still have the memory map reference, and the fds have been
}
/*
* We still have the memory map reference, and the fds have been
@@
-390,7
+401,7
@@
void cleanup_sock_info(struct sock_info *sock_info, int exiting)
int ret;
if (sock_info->socket != -1) {
int ret;
if (sock_info->socket != -1) {
- ret =
close
(sock_info->socket);
+ ret =
ustcomm_close_unix_sock
(sock_info->socket);
if (ret) {
ERR("Error closing apps socket");
}
if (ret) {
ERR("Error closing apps socket");
}
@@
-670,7
+681,7
@@
restart:
}
if (sock_info->socket != -1) {
}
if (sock_info->socket != -1) {
- ret =
close
(sock_info->socket);
+ ret =
ustcomm_close_unix_sock
(sock_info->socket);
if (ret) {
ERR("Error closing %s apps socket", sock_info->name);
}
if (ret) {
ERR("Error closing %s apps socket", sock_info->name);
}
@@
-827,6
+838,15
@@
void __attribute__((constructor)) lttng_ust_init(void)
if (uatomic_xchg(&initialized, 1) == 1)
return;
if (uatomic_xchg(&initialized, 1) == 1)
return;
+ /*
+ * Fixup interdependency between TLS fixup mutex (which happens
+ * to be the dynamic linker mutex) and ust_lock, taken within
+ * the ust lock.
+ */
+ lttng_fixup_event_tls();
+ lttng_fixup_ringbuffer_tls();
+ lttng_fixup_vtid_tls();
+
/*
* We want precise control over the order in which we construct
* our sub-libraries vs starting to receive commands from
/*
* We want precise control over the order in which we construct
* our sub-libraries vs starting to receive commands from
This page took
0.027743 seconds
and
4
git commands to generate.