1 // SPDX-FileCopyrightText: 2020 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
3 // SPDX-License-Identifier: GPL-2.0-only
5 #ifndef _LTTNG_UST_SIGBUS_H
6 #define _LTTNG_UST_SIGBUS_H
11 struct lttng_ust_sigbus_range
{
12 void *start
; /* inclusive */
13 void *end
; /* exclusive */
14 struct cds_list_head node
;
17 struct lttng_ust_sigbus_state
{
19 struct cds_list_head head
; /* struct lttng_ust_sigbus_range */
24 * Define the lttng_ust_sigbus_state TLS variable as initial-exec model
25 * to allow using it from the SIGBUS signal handler. This variable must
26 * be defined by the executable using DEFINE_LTTNG_UST_SIGBUS_STATE()
27 * rather than internally within liblttng-ust-ctl.so to ensure we don't
28 * contribute to reach glibc limits of pre-allocated TLS IE model space
31 #define DEFINE_LTTNG_UST_SIGBUS_STATE() \
32 __thread __attribute__((tls_model("initial-exec"))) struct lttng_ust_sigbus_state lttng_ust_sigbus_state
34 extern __thread
__attribute__((tls_model("initial-exec"))) struct lttng_ust_sigbus_state lttng_ust_sigbus_state
;
36 #endif /* _LTTNG_UST_SIGBUS_H */