summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAliaksey Kandratsenka <alkondratenko@gmail.com>2021-02-21 13:35:43 -0800
committerAliaksey Kandratsenka <alkondratenko@gmail.com>2021-02-21 14:29:34 -0800
commit42bab59f25dee53f91c0ba45e95b73754e197c20 (patch)
tree175f9db3bfc5ea7f46cc0336107d93655061b134
parent4629511e99f85fa8ca40fcbe105e014a725059d2 (diff)
downloadgperftools-42bab59f25dee53f91c0ba45e95b73754e197c20.tar.gz
liberate profile handler from linux_syscall_support
We can get thread's tid in more portable way via libc syscall wrapper.
-rw-r--r--src/profile-handler.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/profile-handler.cc b/src/profile-handler.cc
index be92af7..0db17bb 100644
--- a/src/profile-handler.cc
+++ b/src/profile-handler.cc
@@ -51,9 +51,9 @@
#include <time.h>
// for sigevent
#include <signal.h>
+// for SYS_gettid
+#include <sys/syscall.h>
-// for sys_gettid
-#include "base/linux_syscall_support.h"
// for perftools_pthread_key_create
#include "maybe_threads.h"
#endif
@@ -287,7 +287,7 @@ static void StartLinuxThreadTimer(int timer_type, int signal_number,
struct itimerspec its;
memset(&sevp, 0, sizeof(sevp));
sevp.sigev_notify = SIGEV_THREAD_ID;
- sevp.sigev_notify_thread_id = sys_gettid();
+ sevp.sigev_notify_thread_id = syscall(SYS_gettid);
sevp.sigev_signo = signal_number;
clockid_t clock = CLOCK_THREAD_CPUTIME_ID;
if (timer_type == ITIMER_REAL) {