f8e7bc37a631f1531dbf14aed273264d5fd8ba5e
[lttng-ust.git] / liblttng-ust / getenv.h
1 /*
2 * SPDX-License-Identifier: LGPL-2.1-only
3 *
4 * Copyright (C) 2015 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
5 */
6
7 #ifndef _COMPAT_GETENV_H
8 #define _COMPAT_GETENV_H
9
10 #include "ust-helper.h"
11
12 /*
13 * Always add the lttng-ust environment variables using the lttng_ust_getenv()
14 * infrastructure rather than using getenv() directly. This ensures that we
15 * don't trigger races between getenv() invoked by lttng-ust listener threads
16 * invoked concurrently with setenv() called by an otherwise single-threaded
17 * application thread. (the application is not aware that it runs with
18 * lttng-ust)
19 */
20
21 LTTNG_HIDDEN
22 char *lttng_ust_getenv(const char *name);
23
24 LTTNG_HIDDEN
25 void lttng_ust_getenv_init(void);
26
27 #endif /* _COMPAT_GETENV_H */
This page took 0.028911 seconds and 3 git commands to generate.