portability/Memory.h \
portability/OpenSSL.h \
portability/PThread.h \
+ portability/Semaphore.h \
portability/Sockets.h \
portability/Stdio.h \
portability/Stdlib.h \
#include <folly/futures/InlineExecutor.h>
#include <folly/futures/Promise.h>
#include <folly/portability/GFlags.h>
+#include <folly/portability/Semaphore.h>
-#include <semaphore.h>
#include <vector>
using namespace folly;
--- /dev/null
+/*
+ * Copyright 2017 Facebook, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#pragma once
+
+// On Windows, the include order matters, as the pthread implementation we
+// support attempts to use a different definition of `mode_t` than everything
+// else, so we have to make sure our definition of it is first.
+#include <folly/portability/SysTypes.h>
+
+#include <semaphore.h>
#include <folly/AtomicUnorderedMap.h>
-#include <semaphore.h>
#include <thread>
#include <unordered_map>
#include <folly/Benchmark.h>
#include <folly/portability/GFlags.h>
#include <folly/portability/GTest.h>
+#include <folly/portability/Semaphore.h>
#include <folly/test/DeterministicSchedule.h>
using namespace folly;
#include <folly/Baton.h>
-#include <semaphore.h>
#include <thread>
#include <folly/Benchmark.h>
#include <folly/portability/GFlags.h>
#include <folly/portability/GTest.h>
+#include <folly/portability/Semaphore.h>
#include <folly/test/BatonTestHelpers.h>
#include <folly/test/DeterministicSchedule.h>
#pragma once
-// This needs to be above semaphore.h due to the windows
-// libevent implementation needing mode_t to be defined,
-// but defining it differently than our portability
-// headers do.
-#include <folly/portability/SysTypes.h>
-
#include <assert.h>
#include <boost/noncopyable.hpp>
#include <errno.h>
#include <glog/logging.h>
-#include <semaphore.h>
#include <atomic>
#include <functional>
#include <mutex>
#include <folly/detail/AtomicUtils.h>
#include <folly/detail/CacheLocality.h>
#include <folly/detail/Futex.h>
+#include <folly/portability/Semaphore.h>
namespace folly {
namespace test {
#include <folly/IndexedMemPool.h>
#include <folly/portability/GMock.h>
#include <folly/portability/GTest.h>
+#include <folly/portability/Semaphore.h>
#include <folly/portability/Unistd.h>
#include <folly/test/DeterministicSchedule.h>
#include <string>
#include <thread>
-#include <semaphore.h>
using namespace folly;
using namespace folly::test;
#include <folly/LifoSem.h>
-#include <semaphore.h>
#include <thread>
#include <folly/Benchmark.h>
#include <folly/portability/Asm.h>
#include <folly/portability/GFlags.h>
#include <folly/portability/GTest.h>
+#include <folly/portability/Semaphore.h>
#include <folly/test/DeterministicSchedule.h>
using namespace folly;