Ticket #7906: 7906_it.patch

File 7906_it.patch, 5.0 KB (added by viboes, 10 years ago)
  • shared_mutex.hpp

     
    1414#include <boost/static_assert.hpp>
    1515#include <limits.h>
    1616#include <boost/thread/thread_time.hpp>
     17#if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS
     18#include <boost/thread/detail/thread_interruption.hpp>
     19#endif
    1720#ifdef BOOST_THREAD_USES_CHRONO
    1821#include <boost/chrono/system_clocks.hpp>
    1922#include <boost/chrono/ceil.hpp>
     
    108111
    109112        bool try_lock_shared()
    110113        {
     114#if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS
     115            boost::this_thread::disable_interruption do_not_disturb;
     116#endif
    111117            state_data old_state=state;
    112118            for(;;)
    113119            {
     
    133139
    134140        void lock_shared()
    135141        {
     142#if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS
     143            boost::this_thread::disable_interruption do_not_disturb;
     144#endif
    136145            BOOST_VERIFY(timed_lock_shared(::boost::detail::get_system_time_sentinel()));
    137146        }
    138147
     
    144153        }
    145154        bool timed_lock_shared(boost::system_time const& wait_until)
    146155        {
     156#if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS
     157            boost::this_thread::disable_interruption do_not_disturb;
     158#endif
    147159            for(;;)
    148160            {
    149161                state_data old_state=state;
     
    245257        }
    246258        bool try_lock_shared_until(const chrono::time_point<chrono::system_clock, chrono::system_clock::duration>& tp)
    247259        {
     260#if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS
     261            boost::this_thread::disable_interruption do_not_disturb;
     262#endif
    248263          for(;;)
    249264          {
    250265            state_data old_state=state;
     
    333348
    334349        void unlock_shared()
    335350        {
     351#if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS
     352            boost::this_thread::disable_interruption do_not_disturb;
     353#endif
    336354            state_data old_state=state;
    337355            for(;;)
    338356            {
     
    390408
    391409        bool try_lock()
    392410        {
     411#if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS
     412            boost::this_thread::disable_interruption do_not_disturb;
     413#endif
    393414            state_data old_state=state;
    394415            for(;;)
    395416            {
     
    416437
    417438        bool timed_lock(boost::system_time const& wait_until)
    418439        {
     440#if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS
     441            boost::this_thread::disable_interruption do_not_disturb;
     442#endif
    419443            for(;;)
    420444            {
    421445                state_data old_state=state;
     
    516540        }
    517541        bool try_lock_until(const chrono::time_point<chrono::system_clock, chrono::system_clock::duration>& tp)
    518542        {
     543#if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS
     544            boost::this_thread::disable_interruption do_not_disturb;
     545#endif
    519546          for(;;)
    520547          {
    521548            state_data old_state=state;
     
    605632
    606633        void unlock()
    607634        {
     635#if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS
     636            boost::this_thread::disable_interruption do_not_disturb;
     637#endif
    608638            state_data old_state=state;
    609639            for(;;)
    610640            {
     
    629659
    630660        void lock_upgrade()
    631661        {
     662#if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS
     663            boost::this_thread::disable_interruption do_not_disturb;
     664#endif
    632665            for(;;)
    633666            {
    634667                state_data old_state=state;
     
    672705
    673706        bool try_lock_upgrade()
    674707        {
     708#if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS
     709            boost::this_thread::disable_interruption do_not_disturb;
     710#endif
    675711            state_data old_state=state;
    676712            for(;;)
    677713            {
     
    702738
    703739        void unlock_upgrade()
    704740        {
     741#if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS
     742            boost::this_thread::disable_interruption do_not_disturb;
     743#endif
    705744            state_data old_state=state;
    706745            for(;;)
    707746            {
     
    736775
    737776        void unlock_upgrade_and_lock()
    738777        {
     778#if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS
     779            boost::this_thread::disable_interruption do_not_disturb;
     780#endif
    739781            state_data old_state=state;
    740782            for(;;)
    741783            {
     
    763805
    764806        void unlock_and_lock_upgrade()
    765807        {
     808#if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS
     809            boost::this_thread::disable_interruption do_not_disturb;
     810#endif
    766811            state_data old_state=state;
    767812            for(;;)
    768813            {
     
    810855
    811856        void unlock_and_lock_shared()
    812857        {
     858#if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS
     859            boost::this_thread::disable_interruption do_not_disturb;
     860#endif
    813861            state_data old_state=state;
    814862            for(;;)
    815863            {
     
    834882        }
    835883        void unlock_upgrade_and_lock_shared()
    836884        {
     885#if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS
     886            boost::this_thread::disable_interruption do_not_disturb;
     887#endif
    837888            state_data old_state=state;
    838889            for(;;)
    839890            {