diff options
Diffstat (limited to 'absl/base')
-rw-r--r-- | absl/base/internal/sysinfo.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/absl/base/internal/sysinfo.cc b/absl/base/internal/sysinfo.cc index 5b427fa5..79eaba3e 100644 --- a/absl/base/internal/sysinfo.cc +++ b/absl/base/internal/sysinfo.cc @@ -429,7 +429,7 @@ pid_t GetTID() { return tid; } -#elif defined(__APPLE__) || defined(__FreeBSD__) +#elif defined(__APPLE__) pid_t GetTID() { uint64_t tid; @@ -440,6 +440,10 @@ pid_t GetTID() { return static_cast<pid_t>(tid); } +#elif defined(__FreeBSD__) + +pid_t GetTID() { return static_cast<pid_t>(pthread_getthreadid_np()); } + #elif defined(__OpenBSD__) pid_t GetTID() { return getthrid(); } |