X-Git-Url: http://plrg.eecs.uci.edu/git/?p=folly.git;a=blobdiff_plain;f=folly%2Ftest%2FSmallLocksTest.cpp;h=9da8b2bd098c223e7cec110878fd0b41b8199a50;hp=1618b9f957d522559fcd4e8dbec9065e6937a672;hb=a0c640e8e2ff45bc43b9f8d96cd108bb66635bee;hpb=92f554a525fc603232cc80b4603e4d43ec6b50de diff --git a/folly/test/SmallLocksTest.cpp b/folly/test/SmallLocksTest.cpp index 1618b9f9..9da8b2bd 100644 --- a/folly/test/SmallLocksTest.cpp +++ b/folly/test/SmallLocksTest.cpp @@ -93,7 +93,7 @@ template struct PslTest { void doTest() { using UT = typename std::make_unsigned::type; T ourVal = rand() % T(UT(1) << (sizeof(UT) * 8 - 1)); - for (int i = 0; i < 10000; ++i) { + for (int i = 0; i < 100; ++i) { std::lock_guard> guard(lock); lock.setData(ourVal); for (int n = 0; n < 10; ++n) { @@ -231,9 +231,9 @@ TEST(SmallLocks, MicroLock) { // affect bits outside the ones MicroLock is defined to affect. struct { uint8_t a; - volatile uint8_t b; + std::atomic b; MicroLock alock; - volatile uint8_t d; + std::atomic d; } x; uint8_t origB = 'b';