Allow legacy instrumented applications without _LGPL_SOURCE to
use the legacy v1 tracepoint registration API without requiring
the liburcu-bp symbols to be present in the symbol table.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: Iaa574647442254b34682ea36b858a30e2ecdf98e
if (!lttng_ust_liburcu_bp_synchronize_rcu) {
lttng_ust_liburcu_bp_synchronize_rcu = URCU_FORCE_CAST(void (*)(void),
dlsym(RTLD_DEFAULT, "synchronize_rcu_bp"));
if (!lttng_ust_liburcu_bp_synchronize_rcu) {
lttng_ust_liburcu_bp_synchronize_rcu = URCU_FORCE_CAST(void (*)(void),
dlsym(RTLD_DEFAULT, "synchronize_rcu_bp"));
+ /*
+ * Allow legacy applications compiled without
+ * _LGPL_SOURCE to use v1 API. Those are not
+ * required to be linked against liburcu-bp,
+ * so in those situations the liburcu-bp symbols
+ * are not present in the global symbol table,
+ * and we do not need to call urcu-bp
+ * synchronize.
+ *
+ * However, nothing prevents a _LGPL_SOURCE
+ * instrumented library loaded afterwards to
+ * require liburcu-bp, so we need to check again
+ * in that situation.
+ */
if (!lttng_ust_liburcu_bp_synchronize_rcu)
if (!lttng_ust_liburcu_bp_synchronize_rcu)
}
if (!lttng_ust_liburcu_bp_before_fork) {
lttng_ust_liburcu_bp_before_fork = URCU_FORCE_CAST(void (*)(void),
}
if (!lttng_ust_liburcu_bp_before_fork) {
lttng_ust_liburcu_bp_before_fork = URCU_FORCE_CAST(void (*)(void),