Custom upgrade: suffix lttng_ust_context_provider_{,un}register with 1
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 13 Jun 2022 18:24:14 +0000 (14:24 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 30 Sep 2022 18:33:34 +0000 (14:33 -0400)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: Ib6adae1cab526f2407483223c8dcbb1ba79c263f

src/common/ust-context-provider.h
src/lib/lttng-ust/lttng-context-provider.c

index 43e75b4bcdaa448812dfb2c3e6790aaaba12aea1..29f3d09bf9347b09a5ebc86585d6de5f74e66b5a 100644 (file)
@@ -12,6 +12,7 @@
 #define _LTTNG_UST_CONTEXT_PROVIDER_H
 
 #include <stddef.h>
+#include <lttng/ust-config.h>
 #include <lttng/ust-events.h>
 
 #include "common/dynamic-type.h"
@@ -88,6 +89,12 @@ struct lttng_ust_app_context {
        /* End of base ABI. Fields below should be used after checking struct_size. */
 };
 
+/* Custom upgrade 2.12 to 2.13 */
+#ifndef LTTNG_UST_CUSTOM_UPGRADE_CONFLICTING_SYMBOLS
+#define lttng_ust_context_provider_register            lttng_ust_context_provider_register1
+#define lttng_ust_context_provider_unregister          lttng_ust_context_provider_unregister1
+#endif
+
 /*
  * Returns an opaque pointer on success, which must be passed to
  * lttng_ust_context_provider_unregister for unregistration. Returns
index 4e7e429fcc6ee662c744cd94a818eca68d01eb5f..0626576b52308d8fc877e2594613ba891b7d4636 100644 (file)
@@ -60,7 +60,8 @@ static const struct lttng_ust_context_provider *
        return NULL;
 }
 
-struct lttng_ust_registered_context_provider *lttng_ust_context_provider_register(struct lttng_ust_context_provider *provider)
+static
+struct lttng_ust_registered_context_provider *lttng_ust_context_provider_register_orig(struct lttng_ust_context_provider *provider)
 {
        struct lttng_ust_registered_context_provider *reg_provider = NULL;
        struct cds_hlist_head *head;
@@ -99,7 +100,8 @@ end:
        return reg_provider;
 }
 
-void lttng_ust_context_provider_unregister(struct lttng_ust_registered_context_provider *reg_provider)
+static
+void lttng_ust_context_provider_unregister_orig(struct lttng_ust_registered_context_provider *reg_provider)
 {
        lttng_ust_alloc_tls();
 
@@ -210,3 +212,18 @@ error_field_name_alloc:
 error_event_field_alloc:
        return ret;
 }
+
+/* Custom upgrade 2.12 to 2.13 */
+#undef lttng_ust_context_provider_register
+#undef lttng_ust_context_provider_unregister
+struct lttng_ust_registered_context_provider *lttng_ust_context_provider_register1(struct lttng_ust_context_provider *provider)
+       __attribute ((alias ("lttng_ust_context_provider_register_orig")));
+void lttng_ust_context_provider_unregister1(struct lttng_ust_registered_context_provider *reg_provider)
+       __attribute ((alias ("lttng_ust_context_provider_unregister_orig")));
+
+#ifdef LTTNG_UST_CUSTOM_UPGRADE_CONFLICTING_SYMBOLS
+struct lttng_ust_registered_context_provider *lttng_ust_context_provider_register(struct lttng_ust_context_provider *provider)
+       __attribute ((alias ("lttng_ust_context_provider_register_orig")));
+void lttng_ust_context_provider_unregister(struct lttng_ust_registered_context_provider *reg_provider)
+       __attribute ((alias ("lttng_ust_context_provider_unregister_orig")));
+#endif
This page took 0.028233 seconds and 5 git commands to generate.