Skip to content

Commit

Permalink
liberate profile handler from linux_syscall_support
Browse files Browse the repository at this point in the history
We can get thread's tid in more portable way via libc syscall wrapper.
  • Loading branch information
alk committed Feb 21, 2021
1 parent 4629511 commit 42bab59
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/profile-handler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit 42bab59

Please sign in to comment.