File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
third-party/folly/src/folly Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 2323
2424#include < folly/Optional.h>
2525#include < folly/Portability.h>
26+ #include < folly/Utility.h>
2627#include < folly/synchronization/AtomicNotification.h>
2728#include < folly/synchronization/AtomicRef.h>
2829
@@ -289,11 +290,11 @@ uint8_t MicroLockBase<MaxSpins, MaxYields>::lockAndLoad() noexcept {
289290 if ((oldWord & heldBit ()) == 0 &&
290291 atomic_ref (lock_).compare_exchange_weak (
291292 oldWord,
292- oldWord | heldBit (),
293+ to_narrow ( oldWord | heldBit () ),
293294 std::memory_order_acquire,
294295 std::memory_order_relaxed)) {
295296 // Fast uncontended case: memory_order_acquire above is our barrier
296- return decodeDataFromWord (oldWord | heldBit ());
297+ return decodeDataFromWord (to_narrow ( oldWord | heldBit () ));
297298 } else {
298299 // lockSlowPath doesn't call waitBit(); it just shifts the input bit. Make
299300 // sure its shifting produces the same result a call to waitBit would.
You can’t perform that action at this time.
0 commit comments