glibc 2.30 introduced the function gettid() in sys/types.h to return the
caller's thread ID. In order to avoid conflicts, the already present
gettid() functions have been renamed to sysGettid(). This fixes a
compilation error with X86 arch.
Change-Id: I76c971465fc4b50e4decde8303185439082b2378
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/21379
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Maintainer: Jason Lowe-Power <jason@lowepower.com>
Tested-by: kokoro <noreply+kokoro@google.com>
}
pid_t
-PerfKvmCounter::gettid()
+PerfKvmCounter::sysGettid()
{
return syscall(__NR_gettid);
}
*
* @param signal Signal to send upon overflow
*/
- void enableSignals(int signal) { enableSignals(gettid(), signal); }
+ void enableSignals(int signal) { enableSignals(sysGettid(), signal); }
private:
// Disallow copying
*
* @return Current thread's TID
*/
- pid_t gettid();
+ pid_t sysGettid();
/**
* MMAP the PerfEvent file descriptor.
#endif
static pid_t
-gettid()
+sysGettid()
{
return syscall(__NR_gettid);
}
sev.sigev_notify = SIGEV_THREAD_ID;
sev.sigev_signo = signo;
- sev.sigev_notify_thread_id = gettid();
+ sev.sigev_notify_thread_id = sysGettid();
sev.sigev_value.sival_ptr = NULL;
while (timer_create(clockID, &sev, &timer) == -1) {