projects
/
lttng-ust.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix: Add missing fork test program dependency library
[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 44e8bab4c24ca4aa2a77b72727288c9b24c8e67d..099a6c85f1959ddc98e1cde72059f64d5cecaa42 100644
(file)
--- a/
liblttng-ust/lttng-ust-comm.c
+++ b/
liblttng-ust/lttng-ust-comm.c
@@
-22,7
+22,6
@@
#define _LGPL_SOURCE
#include <sys/types.h>
#include <sys/socket.h>
#define _LGPL_SOURCE
#include <sys/types.h>
#include <sys/socket.h>
-#include <sys/prctl.h>
#include <sys/mman.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <sys/mman.h>
#include <sys/stat.h>
#include <sys/types.h>
@@
-46,6
+45,8
@@
#include <usterr-signal-safe.h>
#include "tracepoint-internal.h"
#include "ltt-tracer-core.h"
#include <usterr-signal-safe.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 ?
@@
-159,7
+160,6
@@
static
int register_app_to_sessiond(int socket)
{
ssize_t ret;
int register_app_to_sessiond(int socket)
{
ssize_t ret;
- int prctl_ret;
struct {
uint32_t major;
uint32_t minor;
struct {
uint32_t major;
uint32_t minor;
@@
-178,11
+178,7
@@
int register_app_to_sessiond(int socket)
reg_msg.uid = getuid();
reg_msg.gid = getgid();
reg_msg.bits_per_long = CAA_BITS_PER_LONG;
reg_msg.uid = getuid();
reg_msg.gid = getgid();
reg_msg.bits_per_long = CAA_BITS_PER_LONG;
- prctl_ret = prctl(PR_GET_NAME, (unsigned long) reg_msg.name, 0, 0, 0);
- if (prctl_ret) {
- ERR("Error executing prctl");
- return -errno;
- }
+ lttng_ust_getprocname(reg_msg.name);
ret = ustcomm_send_unix_sock(socket, ®_msg, sizeof(reg_msg));
if (ret >= 0 && ret != sizeof(reg_msg))
ret = ustcomm_send_unix_sock(socket, ®_msg, sizeof(reg_msg));
if (ret >= 0 && ret != sizeof(reg_msg))
@@
-395,7
+391,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");
}
@@
-675,7
+671,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);
}
@@
-832,6
+828,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.024477 seconds
and
4
git commands to generate.