Switch includes of PThread to the portability header
authorChristopher Dykes <cdykes@fb.com>
Thu, 13 Apr 2017 20:57:26 +0000 (13:57 -0700)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Thu, 13 Apr 2017 21:04:51 +0000 (14:04 -0700)
Summary:
As part of the work towards getting Folly compiling without PThread, it needs to be treated as a non-portable include.
This switches the includes not already covered by other diffs.

Reviewed By: yfeldblum

Differential Revision: D4882777

fbshipit-source-id: d9521564c814f9bcff2fcb358cbb89b3777c327d

folly/ThreadId.h
folly/ThreadName.h
folly/detail/MemoryIdler.cpp
folly/detail/ThreadLocalDetail.h

index db4decd..06d4bb1 100644 (file)
@@ -18,7 +18,7 @@
 
 #include <cstdint>
 
-#include <pthread.h>
+#include <folly/portability/PThread.h>
 
 namespace folly {
 
index 0950885..0a5e599 100644 (file)
 #include <thread>
 #include <type_traits>
 
-#include <pthread.h>
-
 #include <folly/Range.h>
 #include <folly/Traits.h>
+#include <folly/portability/PThread.h>
 
 namespace folly {
 
index 129debd..608e244 100644 (file)
 #include <folly/Portability.h>
 #include <folly/ScopeGuard.h>
 #include <folly/detail/CacheLocality.h>
+#include <folly/portability/PThread.h>
 #include <folly/portability/SysMman.h>
 #include <folly/portability/Unistd.h>
 
 #include <limits.h>
-#include <pthread.h>
 #include <stdio.h>
 #include <string.h>
 #include <utility>
index dcfc058..9c86385 100644 (file)
@@ -17,7 +17,6 @@
 #pragma once
 
 #include <limits.h>
-#include <pthread.h>
 
 #include <atomic>
 #include <functional>
@@ -34,6 +33,7 @@
 #include <folly/MicroSpinLock.h>
 #include <folly/Portability.h>
 #include <folly/ScopeGuard.h>
+#include <folly/portability/PThread.h>
 
 #include <folly/detail/StaticSingletonManager.h>