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:
Jory A. Pratt 2019-06-14 07:16:31 +00:00
Родитель 48e87027fe
Коммит 9c57855404
2 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -76,7 +76,7 @@ int profiler_current_process_id() { return getpid(); }
int profiler_current_thread_id() {
// 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)));
#else
return static_cast<int>(gettid());

Просмотреть файл

@ -73,7 +73,7 @@ int profiler_current_process_id() { return getpid(); }
int profiler_current_thread_id() {
// 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)));
#else
return static_cast<int>(gettid());