From: Christopher Dykes Date: Fri, 14 Apr 2017 01:52:20 +0000 (-0700) Subject: Support folly::getCurrentThreadID() without PThread X-Git-Tag: v2017.04.17.00~18 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=ee080728f82d00c1cadb9a0545da49b4a73749fa;p=folly.git Support folly::getCurrentThreadID() without PThread Summary: Just use the native Windows API call instead, as it gives the same result. Reviewed By: yfeldblum Differential Revision: D4887587 fbshipit-source-id: adbfd288bea425f1aff46d0685083807490f7f09 --- diff --git a/folly/ThreadId.h b/folly/ThreadId.h index 06d4bb14..2a30ff78 100644 --- a/folly/ThreadId.h +++ b/folly/ThreadId.h @@ -19,14 +19,13 @@ #include #include +#include namespace folly { inline uint64_t getCurrentThreadID() { #ifdef _WIN32 - // There's no need to force a Windows.h include, so grab the ID - // via pthread instead. - return uint64_t(pthread_getw32threadid_np(pthread_self())); + return uint64_t(GetCurrentThreadId()); #else return uint64_t(pthread_self()); #endif