From: Michael Jeanson Date: Thu, 11 Mar 2021 21:24:46 +0000 (-0500) Subject: Namespace lttng_context_procname_reset public symbol X-Git-Tag: v2.13.0-rc1~280 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=0af0bdb2f1059112521da3e2d067262f78e783d7;p=lttng-ust.git Namespace lttng_context_procname_reset public symbol The major SONAME bump to '1' gives us the opportunity to properly namespace public symbols. Note that this is also an API break. Change-Id: I9f966ce7f4c112542f602e78a5e4f5c8f0d0f642 Signed-off-by: Michael Jeanson Signed-off-by: Mathieu Desnoyers --- diff --git a/include/lttng/ust-events.h b/include/lttng/ust-events.h index 624af8bb..41dcbaf3 100644 --- a/include/lttng/ust-events.h +++ b/include/lttng/ust-events.h @@ -609,9 +609,12 @@ int lttng_ust_probe_register(struct lttng_ust_probe_desc *desc); void lttng_ust_probe_unregister(struct lttng_ust_probe_desc *desc); /* - * Can be used by applications that change their procname to clear the ust cached value. + * Applications that change their procname and need the new value to be + * reflected in the procname event context have to call this function to clear + * the internally cached value. This should not be called from a signal + * handler. */ -void lttng_context_procname_reset(void); +void lttng_ust_context_procname_reset(void); struct lttng_transport *lttng_transport_find(const char *name); diff --git a/liblttng-ust/lttng-context-procname.c b/liblttng-ust/lttng-context-procname.c index ec89bd8a..d467b43c 100644 --- a/liblttng-ust/lttng-context-procname.c +++ b/liblttng-ust/lttng-context-procname.c @@ -56,7 +56,7 @@ char *wrapper_getprocname(void) } /* Reset should not be called from a signal handler. */ -void lttng_context_procname_reset(void) +void lttng_ust_context_procname_reset(void) { CMM_STORE_SHARED(URCU_TLS(cached_procname)[1][0], '\0'); CMM_STORE_SHARED(URCU_TLS(procname_nesting), 1); diff --git a/liblttng-ust/lttng-ust-comm.c b/liblttng-ust/lttng-ust-comm.c index fcf2cb14..14046381 100644 --- a/liblttng-ust/lttng-ust-comm.c +++ b/liblttng-ust/lttng-ust-comm.c @@ -2444,7 +2444,7 @@ void ust_after_fork_child(sigset_t *restore_sigset) return; lttng_context_vpid_reset(); lttng_context_vtid_reset(); - lttng_context_procname_reset(); + lttng_ust_context_procname_reset(); ust_context_ns_reset(); ust_context_vuids_reset(); ust_context_vgids_reset();