Index: shared_mutex.hpp =================================================================== --- shared_mutex.hpp (revision 82625) +++ shared_mutex.hpp (working copy) @@ -14,6 +14,9 @@ #include #include #include +#if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS +#include +#endif #ifdef BOOST_THREAD_USES_CHRONO #include #include @@ -108,6 +111,9 @@ bool try_lock_shared() { +#if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS + boost::this_thread::disable_interruption do_not_disturb; +#endif state_data old_state=state; for(;;) { @@ -133,6 +139,9 @@ void lock_shared() { +#if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS + boost::this_thread::disable_interruption do_not_disturb; +#endif BOOST_VERIFY(timed_lock_shared(::boost::detail::get_system_time_sentinel())); } @@ -144,6 +153,9 @@ } bool timed_lock_shared(boost::system_time const& wait_until) { +#if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS + boost::this_thread::disable_interruption do_not_disturb; +#endif for(;;) { state_data old_state=state; @@ -245,6 +257,9 @@ } bool try_lock_shared_until(const chrono::time_point& tp) { +#if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS + boost::this_thread::disable_interruption do_not_disturb; +#endif for(;;) { state_data old_state=state; @@ -333,6 +348,9 @@ void unlock_shared() { +#if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS + boost::this_thread::disable_interruption do_not_disturb; +#endif state_data old_state=state; for(;;) { @@ -390,6 +408,9 @@ bool try_lock() { +#if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS + boost::this_thread::disable_interruption do_not_disturb; +#endif state_data old_state=state; for(;;) { @@ -416,6 +437,9 @@ bool timed_lock(boost::system_time const& wait_until) { +#if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS + boost::this_thread::disable_interruption do_not_disturb; +#endif for(;;) { state_data old_state=state; @@ -516,6 +540,9 @@ } bool try_lock_until(const chrono::time_point& tp) { +#if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS + boost::this_thread::disable_interruption do_not_disturb; +#endif for(;;) { state_data old_state=state; @@ -605,6 +632,9 @@ void unlock() { +#if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS + boost::this_thread::disable_interruption do_not_disturb; +#endif state_data old_state=state; for(;;) { @@ -629,6 +659,9 @@ void lock_upgrade() { +#if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS + boost::this_thread::disable_interruption do_not_disturb; +#endif for(;;) { state_data old_state=state; @@ -672,6 +705,9 @@ bool try_lock_upgrade() { +#if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS + boost::this_thread::disable_interruption do_not_disturb; +#endif state_data old_state=state; for(;;) { @@ -702,6 +738,9 @@ void unlock_upgrade() { +#if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS + boost::this_thread::disable_interruption do_not_disturb; +#endif state_data old_state=state; for(;;) { @@ -736,6 +775,9 @@ void unlock_upgrade_and_lock() { +#if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS + boost::this_thread::disable_interruption do_not_disturb; +#endif state_data old_state=state; for(;;) { @@ -763,6 +805,9 @@ void unlock_and_lock_upgrade() { +#if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS + boost::this_thread::disable_interruption do_not_disturb; +#endif state_data old_state=state; for(;;) { @@ -810,6 +855,9 @@ void unlock_and_lock_shared() { +#if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS + boost::this_thread::disable_interruption do_not_disturb; +#endif state_data old_state=state; for(;;) { @@ -834,6 +882,9 @@ } void unlock_upgrade_and_lock_shared() { +#if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS + boost::this_thread::disable_interruption do_not_disturb; +#endif state_data old_state=state; for(;;) {