Replace all includes of pthread.h with the portability header
authorChristopher Dykes <cdykes@fb.com>
Fri, 14 Jul 2017 22:59:17 +0000 (15:59 -0700)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Fri, 14 Jul 2017 23:06:27 +0000 (16:06 -0700)
Summary: It is a non-portable include as it is include-order sensitive.

Reviewed By: yfeldblum

Differential Revision: D5427885

fbshipit-source-id: 50850064fc8fa3ed6f8fc235f31edbda4144663c

folly/experimental/symbolizer/SignalHandler.cpp
folly/io/async/test/AsyncSSLSocketTest.h
folly/io/async/test/AsyncSSLSocketTest2.cpp
folly/test/ProducerConsumerQueueBenchmark.cpp
folly/test/SmallLocksTest.cpp

index 49fbb2057f7a7ceb3451b289fe054d35385b5cbb..ccc7bd1800edf3cd54a752a5e5c1359c90e523e2 100644 (file)
@@ -18,7 +18,6 @@
 
 #include <folly/experimental/symbolizer/SignalHandler.h>
 
-#include <pthread.h>
 #include <signal.h>
 #include <sys/types.h>
 
@@ -34,6 +33,7 @@
 #include <folly/ScopeGuard.h>
 #include <folly/experimental/symbolizer/ElfCache.h>
 #include <folly/experimental/symbolizer/Symbolizer.h>
+#include <folly/portability/PThread.h>
 #include <folly/portability/SysSyscall.h>
 #include <folly/portability/Unistd.h>
 
index 103b75c1d061832f943979049b54834fda6b1da3..3e400804659d2410eeeaacb2811dcaa04a61f57b 100644 (file)
@@ -15,7 +15,6 @@
  */
 #pragma once
 
-#include <pthread.h>
 #include <signal.h>
 
 #include <folly/ExceptionWrapper.h>
@@ -30,6 +29,7 @@
 #include <folly/io/async/ssl/SSLErrors.h>
 #include <folly/io/async/test/TestSSLServer.h>
 #include <folly/portability/GTest.h>
+#include <folly/portability/PThread.h>
 #include <folly/portability/Sockets.h>
 #include <folly/portability/Unistd.h>
 
index c221d5d1b50fd5c688ac018cbfaf83b7bdde21aa..f0b5dd7fbf5cd7b700b28e19c71e1e670c2b9de2 100644 (file)
@@ -15,8 +15,6 @@
  */
 #include <folly/io/async/test/AsyncSSLSocketTest.h>
 
-#include <pthread.h>
-
 #include <folly/futures/Promise.h>
 #include <folly/init/Init.h>
 #include <folly/io/async/AsyncSSLSocket.h>
@@ -24,6 +22,7 @@
 #include <folly/io/async/SSLContext.h>
 #include <folly/io/async/ScopedEventBaseThread.h>
 #include <folly/portability/GTest.h>
+#include <folly/portability/PThread.h>
 
 using std::string;
 using std::vector;
index 01b83d97445d0aa8dc7ac1a3e50522b69fc913cc..0ee9b88429e7f54c9a5d0f65ff9cd5e267dea098 100644 (file)
@@ -18,8 +18,6 @@
 
 #include <folly/ProducerConsumerQueue.h>
 
-#include <pthread.h>
-
 #include <cstdio>
 #include <iostream>
 #include <thread>
@@ -28,6 +26,7 @@
 
 #include <folly/Benchmark.h>
 #include <folly/portability/GFlags.h>
+#include <folly/portability/PThread.h>
 #include <folly/stats/Histogram.h>
 #include <folly/stats/Histogram-defs.h>
 
index 1e71086f74f9bef4ed089cd74d4dc043ece3a881..630c7c6e5a688540d882fd4417414255cf40d1f3 100644 (file)
@@ -16,8 +16,6 @@
 
 #include <folly/SmallLocks.h>
 
-#include <pthread.h>
-
 #include <cassert>
 #include <condition_variable>
 #include <cstdio>
@@ -29,6 +27,7 @@
 #include <folly/Random.h>
 #include <folly/portability/Asm.h>
 #include <folly/portability/GTest.h>
+#include <folly/portability/PThread.h>
 #include <folly/portability/Unistd.h>
 
 using folly::MSLGuard;