[sysprof] libsysprof-capture: set tid to pid on non-Linux



commit 4cfb51421b5b5972700cafce6517962d53dc0f54
Author: Christian Hergert <chergert redhat com>
Date:   Tue Feb 18 13:17:22 2020 -0800

    libsysprof-capture: set tid to pid on non-Linux

 src/libsysprof-capture/sysprof-collector.c | 2 ++
 1 file changed, 2 insertions(+)
---
diff --git a/src/libsysprof-capture/sysprof-collector.c b/src/libsysprof-capture/sysprof-collector.c
index 83609f1..080bcf4 100644
--- a/src/libsysprof-capture/sysprof-collector.c
+++ b/src/libsysprof-capture/sysprof-collector.c
@@ -241,6 +241,8 @@ sysprof_collector_get (void)
     self->pid = getpid ();
 #ifdef __linux__
     self->tid = syscall (__NR_gettid, 0);
+#else
+    self->tid = self->pid;
 #endif
 
     if (g_getenv ("SYSPROF_CONTROL_FD") != NULL)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]