projects
/
folly.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
214b26f
)
Support folly::getCurrentThreadID() without PThread
author
Christopher Dykes
<cdykes@fb.com>
Fri, 14 Apr 2017 01:52:20 +0000
(18:52 -0700)
committer
Facebook Github Bot
<facebook-github-bot@users.noreply.github.com>
Fri, 14 Apr 2017 01:52:55 +0000
(18:52 -0700)
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
folly/ThreadId.h
patch
|
blob
|
history
diff --git
a/folly/ThreadId.h
b/folly/ThreadId.h
index 06d4bb1402c90c7667a4a0a979856512fda6295c..2a30ff784cc889195eeeba710d0e00424da564ef 100644
(file)
--- a/
folly/ThreadId.h
+++ b/
folly/ThreadId.h
@@
-19,14
+19,13
@@
#include <cstdint>
#include <folly/portability/PThread.h>
+#include <folly/portability/Windows.h>
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