Commit | Line | Data |
---|---|---|
730bf2af | 1 | /* |
c0c0989a | 2 | * SPDX-License-Identifier: LGPL-2.1-only |
730bf2af | 3 | * |
c0c0989a | 4 | * Copyright (C) 2015 Mathieu Desnoyers <mathieu.desnoyers@efficios.com> |
730bf2af MD |
5 | */ |
6 | ||
c0c0989a MJ |
7 | #ifndef _COMPAT_GETENV_H |
8 | #define _COMPAT_GETENV_H | |
9 | ||
6f626d28 | 10 | /* |
4c41b460 MJ |
11 | * Always add the lttng-ust environment variables using the lttng_ust_getenv() |
12 | * infrastructure rather than using getenv() directly. This ensures that we | |
13 | * don't trigger races between getenv() invoked by lttng-ust listener threads | |
14 | * invoked concurrently with setenv() called by an otherwise single-threaded | |
15 | * application thread. (the application is not aware that it runs with | |
16 | * lttng-ust) | |
6f626d28 | 17 | */ |
730bf2af | 18 | |
ddabe860 | 19 | __attribute__((visibility("hidden"))) |
4c41b460 | 20 | char *lttng_ust_getenv(const char *name); |
730bf2af | 21 | |
ddabe860 | 22 | __attribute__((visibility("hidden"))) |
6f626d28 | 23 | void lttng_ust_getenv_init(void); |
730bf2af MD |
24 | |
25 | #endif /* _COMPAT_GETENV_H */ |