/*
- * Copyright 2013 Facebook, Inc.
+ * 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.
// @author xliu (xliux@fb.com)
//
+#include <folly/RWSpinLock.h>
+
#include <stdlib.h>
-#include <unistd.h>
#include <vector>
#include <thread>
-#include "gtest/gtest.h"
-#include <gflags/gflags.h>
#include <glog/logging.h>
-#include "folly/RWSpinLock.h"
+
+#include <folly/portability/GFlags.h>
+#include <folly/portability/GTest.h>
+#include <folly/portability/Unistd.h>
DEFINE_int32(num_threads, 8, "num threads");
};
typedef testing::Types<RWSpinLock
-#if defined(__GNUC__) && (defined(__i386) || defined(__x86_64__) || \
- defined(ARCH_K8))
+#ifdef RW_SPINLOCK_USE_X86_INTRINSIC_
, RWTicketSpinLockT<32, true>,
RWTicketSpinLockT<32, false>,
RWTicketSpinLockT<64, true>,
}
}
-
-int main(int argc, char** argv) {
- testing::InitGoogleTest(&argc, argv);
- google::ParseCommandLineFlags(&argc, &argv, true);
- return RUN_ALL_TESTS();
-}