2 * SPDX-License-Identifier: MIT
4 * Copyright (C) 2020 Michael Jeanson <mjeanson@efficios.com>
6 * Public symbols of liblttng-ust-libc-wrapper.so
9 #ifndef _LTTNG_UST_LIBC_WRAPPER_H
10 #define _LTTNG_UST_LIBC_WRAPPER_H
13 * This is the constructor for the malloc part of the libc wrapper. It is
14 * publicly exposed because the malloc override needs to be initialized before
15 * the process becomes multithreaded and thus must happen before the main
16 * constructor of liblttng-ust starts threads. Since there is no reliable way
17 * to guarantee the execution order of constructors across shared library, the
18 * liblttng-ust constructor has to call the malloc constructor before starting
19 * any thread. This is achieved by having a weak public version of this
20 * function in liblttng-ust that is overridden by the one in
21 * liblttng-ust-wrapper-libc when it's preloaded.
23 void lttng_ust_libc_wrapper_malloc_ctor(void)
24 __attribute__((constructor
));
This page took 0.03085 seconds and 5 git commands to generate.