Use RW_SPINLOCK_USE_X86_INTRINSIC_ in RWSpinLockTest
authorPeter Griess <pgriess@fb.com>
Thu, 26 Sep 2013 14:35:29 +0000 (09:35 -0500)
committerPeter Griess <pgriess@fb.com>
Tue, 15 Oct 2013 01:46:31 +0000 (18:46 -0700)
Summary:
- This macro is computed based on whether or not we support x86
intrinsics in RWSpinLock.h; re-use it rather than re-computing
this (and getting it wrong).

Test Plan:
- fbconfig -r folly && fbmake runtests
- ./configure && make check on Ubuntu/FC/Mac

Reviewed By: oyamauchi@fb.com

FB internal diff: D998586

folly/test/RWSpinLockTest.cpp

index 9169e887be893a3dd57654691bc1d36f29bec82b..8518173063f48e933e23833076857484bc3b5495 100644 (file)
@@ -41,8 +41,7 @@ template<typename RWSpinLockT> struct RWSpinLockTest: public testing::Test {
 };
 
 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>,