зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1358214 - gettid wrapper is not provided by any libc in linux r=njn
BIONIC is only platform that actually supports gettid. Easiest solution is to check for linux and disable for BIONIC platform. This includes the change requested by Gerald to keep the two profilers sync'd. Differential Revision: https://phabricator.services.mozilla.com/D34919 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
48e87027fe
Коммит
9c57855404
|
@ -76,7 +76,7 @@ int profiler_current_process_id() { return getpid(); }
|
||||||
|
|
||||||
int profiler_current_thread_id() {
|
int profiler_current_thread_id() {
|
||||||
// glibc doesn't provide a wrapper for gettid().
|
// glibc doesn't provide a wrapper for gettid().
|
||||||
#if defined(__GLIBC__)
|
#if defined(__linux__) || !defined(__BIONIC__)
|
||||||
return static_cast<int>(static_cast<pid_t>(syscall(SYS_gettid)));
|
return static_cast<int>(static_cast<pid_t>(syscall(SYS_gettid)));
|
||||||
#else
|
#else
|
||||||
return static_cast<int>(gettid());
|
return static_cast<int>(gettid());
|
||||||
|
|
|
@ -73,7 +73,7 @@ int profiler_current_process_id() { return getpid(); }
|
||||||
|
|
||||||
int profiler_current_thread_id() {
|
int profiler_current_thread_id() {
|
||||||
// glibc doesn't provide a wrapper for gettid().
|
// glibc doesn't provide a wrapper for gettid().
|
||||||
#if defined(__GLIBC__)
|
#if defined(__linux__) || !defined(__BIONIC__)
|
||||||
return static_cast<int>(static_cast<pid_t>(syscall(SYS_gettid)));
|
return static_cast<int>(static_cast<pid_t>(syscall(SYS_gettid)));
|
||||||
#else
|
#else
|
||||||
return static_cast<int>(gettid());
|
return static_cast<int>(gettid());
|
||||||
|
|
Загрузка…
Ссылка в новой задаче