Custom upgrade: suffix getcpu plugin symbol with 1
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 13 Jun 2022 19:06:15 +0000 (15:06 -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: I44e451258ff1570bf5f6bbb40650a6059c72811b

include/lttng/ust-getcpu.h
src/lib/lttng-ust-common/getcpu.c

index f5f08c6b7d844e81c14273876444a1abc72d2456..efd34f21ad385dec56e265d4a740ee1eb64c2e8c 100644 (file)
@@ -9,6 +9,13 @@
 
 #include <stdint.h>
 #include <stddef.h>
+#include <lttng/ust-config.h>
+
+/* Custom upgrade 2.12 to 2.13 */
+
+#ifndef LTTNG_UST_CUSTOM_UPGRADE_CONFLICTING_SYMBOLS
+#define lttng_ust_getcpu_override      lttng_ust_getcpu_override1
+#endif
 
 /*
  * Set getcpu override read callback. This callback should return the
index e80bcf1ff83b0e67699d177398573152dc7841d4..748ca3918e11cc1fa0a70e608c40734a6d1bd553 100644 (file)
@@ -25,7 +25,7 @@ void *getcpu_plugin_handle;
 /*
  * Override the user provided getcpu implementation.
  */
-int lttng_ust_getcpu_override(int (*getcpu)(void))
+static int lttng_ust_getcpu_override_orig(int (*getcpu)(void))
 {
        CMM_STORE_SHARED(lttng_ust_get_cpu_sym, getcpu);
        return 0;
@@ -75,3 +75,14 @@ void lttng_ust_getcpu_plugin_init(void)
        /* Run the user provided getcpu plugin init function. */
        getcpu_plugin_init();
 }
+
+/* Custom upgrade 2.12 to 2.13 */
+
+#undef lttng_ust_getcpu_override
+int lttng_ust_getcpu_override1(int (*getcpu)(void))
+       __attribute__ ((alias ("lttng_ust_getcpu_override_orig")));
+
+#ifdef LTTNG_UST_CUSTOM_UPGRADE_CONFLICTING_SYMBOLS
+int lttng_ust_getcpu_override(int (*getcpu)(void))
+       __attribute__ ((alias ("lttng_ust_getcpu_override_orig")));
+#endif
This page took 0.026427 seconds and 5 git commands to generate.