summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
c73b6bc)
The major SONAME bump to '1' gives us the opportunity to hide private
symbols that should never have been visible.
Also namespace lttng_getenv to lttng_ust_getenv to match the init
function.
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: I03f9c4f431d521a3b2419bde23a51d495155730c
return geteuid() != getuid() || getegid() != getgid();
}
return geteuid() != getuid() || getegid() != getgid();
}
-char *lttng_getenv(const char *name)
+char *lttng_ust_getenv(const char *name)
{
size_t i;
struct lttng_env *e;
{
size_t i;
struct lttng_env *e;
#ifndef _COMPAT_GETENV_H
#define _COMPAT_GETENV_H
#ifndef _COMPAT_GETENV_H
#define _COMPAT_GETENV_H
+#include "ust-helper.h"
+
- * Always add the lttng-ust environment variables to lttng_getenv()
- * infrastructure rather than using getenv() directly from lttng-ust.
- * This ensures that we don't trigger races between getenv() invoked by
- * lttng-ust listener threads invoked concurrently with setenv() called
- * by an otherwise single-threaded application thread. (the application
- * is not aware that it runs with lttng-ust)
+ * Always add the lttng-ust environment variables using the lttng_ust_getenv()
+ * infrastructure rather than using getenv() directly. This ensures that we
+ * don't trigger races between getenv() invoked by lttng-ust listener threads
+ * invoked concurrently with setenv() called by an otherwise single-threaded
+ * application thread. (the application is not aware that it runs with
+ * lttng-ust)
-char *lttng_getenv(const char *name);
+LTTNG_HIDDEN
+char *lttng_ust_getenv(const char *name);
void lttng_ust_getenv_init(void);
#endif /* _COMPAT_GETENV_H */
void lttng_ust_getenv_init(void);
#endif /* _COMPAT_GETENV_H */
if (clock_handle)
return;
if (clock_handle)
return;
- libname = lttng_getenv("LTTNG_UST_CLOCK_PLUGIN");
+ libname = lttng_ust_getenv("LTTNG_UST_CLOCK_PLUGIN");
if (!libname)
return;
clock_handle = dlopen(libname, RTLD_NOW);
if (!libname)
return;
clock_handle = dlopen(libname, RTLD_NOW);
if (getcpu_handle)
return;
if (getcpu_handle)
return;
- libname = lttng_getenv("LTTNG_UST_GETCPU_PLUGIN");
+ libname = lttng_ust_getenv("LTTNG_UST_GETCPU_PLUGIN");
if (!libname)
return;
getcpu_handle = dlopen(libname, RTLD_NOW);
if (!libname)
return;
getcpu_handle = dlopen(libname, RTLD_NOW);
- val = (const char *) lttng_getenv("LTTNG_HOME");
+ val = (const char *) lttng_ust_getenv("LTTNG_HOME");
if (val != NULL) {
return val;
}
if (val != NULL) {
return val;
}
- return (const char *) lttng_getenv("HOME");
+ return (const char *) lttng_ust_getenv("HOME");
long constructor_delay_ms = LTTNG_UST_DEFAULT_CONSTRUCTOR_TIMEOUT_MS;
if (!got_timeout_env) {
long constructor_delay_ms = LTTNG_UST_DEFAULT_CONSTRUCTOR_TIMEOUT_MS;
if (!got_timeout_env) {
- str_timeout = lttng_getenv("LTTNG_UST_REGISTER_TIMEOUT");
+ str_timeout = lttng_ust_getenv("LTTNG_UST_REGISTER_TIMEOUT");
got_timeout_env = 1;
}
if (str_timeout)
got_timeout_env = 1;
}
if (str_timeout)
void get_allow_blocking(void)
{
const char *str_allow_blocking =
void get_allow_blocking(void)
{
const char *str_allow_blocking =
- lttng_getenv("LTTNG_UST_ALLOW_BLOCKING");
+ lttng_ust_getenv("LTTNG_UST_ALLOW_BLOCKING");
if (str_allow_blocking) {
DBG("%s environment variable is set",
if (str_allow_blocking) {
DBG("%s environment variable is set",
{
struct dl_iterate_data data;
{
struct dl_iterate_data data;
- if (lttng_getenv("LTTNG_UST_WITHOUT_BADDR_STATEDUMP"))
+ if (lttng_ust_getenv("LTTNG_UST_WITHOUT_BADDR_STATEDUMP"))
static
int do_baddr_statedump(void *owner)
{
static
int do_baddr_statedump(void *owner)
{
- if (lttng_getenv("LTTNG_UST_WITHOUT_BADDR_STATEDUMP"))
+ if (lttng_ust_getenv("LTTNG_UST_WITHOUT_BADDR_STATEDUMP"))
return 0;
lttng_ust_dl_update(LTTNG_UST_CALLER_IP());
ust_dl_table_statedump(owner);
return 0;
lttng_ust_dl_update(LTTNG_UST_CALLER_IP());
ust_dl_table_statedump(owner);
static
int do_procname_statedump(void *owner)
{
static
int do_procname_statedump(void *owner)
{
- if (lttng_getenv("LTTNG_UST_WITHOUT_PROCNAME_STATEDUMP"))
+ if (lttng_ust_getenv("LTTNG_UST_WITHOUT_PROCNAME_STATEDUMP"))
return 0;
trace_statedump_event(procname_cb, owner, lttng_ust_sockinfo_get_procname(owner));
return 0;
trace_statedump_event(procname_cb, owner, lttng_ust_sockinfo_get_procname(owner));
if (ust_err_loglevel == UST_ERR_LOGLEVEL_UNKNOWN) {
/*
if (ust_err_loglevel == UST_ERR_LOGLEVEL_UNKNOWN) {
/*
- * This getenv is not part of lttng_getenv() because it
+ * This getenv is not part of lttng_ust_getenv() because it
* is required to print ERR() performed during getenv
* initialization.
*/
* is required to print ERR() performed during getenv
* initialization.
*/