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 db4decdb790327bbcfd24596c139cb2b1c2c791b..06d4bb1402c90c7667a4a0a979856512fda6295c 100644 (file)
@@ -18,7 +18,7 @@
 
 #include <cstdint>
 
-#include <pthread.h>
+#include <folly/portability/PThread.h>
 
 namespace folly {
 
index 095088567d94ef2b062ca9e244eb4301bcb42360..0a5e59984bb94a0a258ea14156bf04b8112f6c9b 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 129debddc17ce86bdb1fc26eabe261c06965542d..608e244b4fac377a8a195b971fb6b7a83f4498d6 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 dcfc058ac61a2259773c46b501e9ae53f4557899..9c86385128a17a7e7eb9f2637b94c7aa3e6bec30 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>