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

This commit is contained in:
Christian Hergert
2020-02-18 13:17:22 -08:00
parent 4fd2068367
commit 4cfb51421b

View File

@ -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)