+#if defined(FOLLY_SANITIZE_THREAD)
+ // TODO: Might be able to fully move to std::atomic when gcc emits lock btr:
+ // https://gcc.gnu.org/bugzilla/show_bug.cgi?id=49244
+ ret =
+ !(reinterpret_cast<std::atomic<UIntType>*>(&lock_)->fetch_or(
+ kLockBitMask_, std::memory_order_acquire) &
+ kLockBitMask_);
+#elif _MSC_VER