X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=ceph%2Fsrc%2Fboost%2Flibs%2Ffiber%2Ftest%2Ftest_condition_mt_dispatch.cpp;h=e57fd0876e7e374daf8c55720845be531ce1809c;hb=b32b81446b3b05102be0267e79203f59329c1d97;hp=3862eaeb00116e77e02da116baf5740e23632f68;hpb=215dd7151453fae88e6f968c975b6ce309d42dcf;p=ceph.git diff --git a/ceph/src/boost/libs/fiber/test/test_condition_mt_dispatch.cpp b/ceph/src/boost/libs/fiber/test/test_condition_mt_dispatch.cpp index 3862eaeb0..e57fd0876 100644 --- a/ceph/src/boost/libs/fiber/test/test_condition_mt_dispatch.cpp +++ b/ceph/src/boost/libs/fiber/test/test_condition_mt_dispatch.cpp @@ -28,7 +28,7 @@ typedef boost::chrono::milliseconds ms; -boost::atomic< int > value; +boost::atomic< int > value1; void wait_fn( boost::barrier & b, boost::fibers::mutex & mtx, @@ -37,7 +37,7 @@ void wait_fn( boost::barrier & b, b.wait(); std::unique_lock< boost::fibers::mutex > lk( mtx); cond.wait( lk, [&flag](){ return flag; }); - ++value; + ++value1; } void notify_one_fn( boost::barrier & b, @@ -106,11 +106,11 @@ void test_one_waiter_notify_one() { boost::barrier b( 2); bool flag = false; - value = 0; + value1 = 0; boost::fibers::mutex mtx; boost::fibers::condition_variable cond; - BOOST_CHECK( 0 == value); + BOOST_CHECK( 0 == value1); boost::thread t1(std::bind( fn1, std::ref( b), std::ref( mtx), std::ref( cond), std::ref( flag) ) ); boost::thread t2(std::bind( fn2, std::ref( b), std::ref( mtx), std::ref( cond), std::ref( flag) ) ); @@ -118,7 +118,7 @@ void test_one_waiter_notify_one() { t1.join(); t2.join(); - BOOST_CHECK( 1 == value); + BOOST_CHECK( 1 == value1); } } @@ -127,11 +127,11 @@ void test_two_waiter_notify_all() { boost::barrier b( 3); bool flag = false; - value = 0; + value1 = 0; boost::fibers::mutex mtx; boost::fibers::condition_variable cond; - BOOST_CHECK( 0 == value); + BOOST_CHECK( 0 == value1); boost::thread t1(std::bind( fn1, std::ref( b), std::ref( mtx), std::ref( cond), std::ref( flag) ) ); boost::thread t2(std::bind( fn1, std::ref( b), std::ref( mtx), std::ref( cond), std::ref( flag) ) ); @@ -141,7 +141,7 @@ void test_two_waiter_notify_all() { t2.join(); t3.join(); - BOOST_CHECK( 2 == value); + BOOST_CHECK( 2 == value1); } }