[lttng-dev] [PATCH lttng-ust] Fix: get tid not pid in vtid context

Michael Jeanson mjeanson at efficios.com
Mon Jun 3 14:21:10 EDT 2019


Looks like an over enthusiastic copy/paste error in
commit 98357ffd0125c23387d42d4b706c56077392326d.

Signed-off-by: Michael Jeanson <mjeanson at efficios.com>
---
 liblttng-ust/lttng-context-vtid.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/liblttng-ust/lttng-context-vtid.c b/liblttng-ust/lttng-context-vtid.c
index 5cefe953..80661f63 100644
--- a/liblttng-ust/lttng-context-vtid.c
+++ b/liblttng-ust/lttng-context-vtid.c
@@ -63,7 +63,7 @@ pid_t wrapper_getvtid(void)
 
 	vtid = CMM_LOAD_SHARED(URCU_TLS(cached_vtid));
 	if (caa_unlikely(!vtid)) {
-		vtid = getpid();
+		vtid = gettid();
 		CMM_STORE_SHARED(URCU_TLS(cached_vtid), vtid);
 	}
 	return vtid;
-- 
2.17.1



More information about the lttng-dev mailing list