Commit 9b2f7afe authored by Christopher Dykes's avatar Christopher Dykes Committed by Facebook Github Bot

Make folly::getCurrentThreadId() return a thread ID on OSX

Summary: It was previously returning a pointer masquerading as a `uint64_t`.

Reviewed By: yfeldblum

Differential Revision: D4888325

fbshipit-source-id: 6cf6ed09f0e7a39a8a2f93d3fa14b06913c27805
parent 1244eb24
...@@ -24,7 +24,9 @@ ...@@ -24,7 +24,9 @@
namespace folly { namespace folly {
inline uint64_t getCurrentThreadID() { inline uint64_t getCurrentThreadID() {
#ifdef _WIN32 #if __APPLE__
return uint64_t(pthread_mach_thread_np(pthread_self()));
#elif _WIN32
return uint64_t(GetCurrentThreadId()); return uint64_t(GetCurrentThreadId());
#else #else
return uint64_t(pthread_self()); return uint64_t(pthread_self());
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment