Ticket #7906: 7906_it.patch
File 7906_it.patch, 5.0 KB (added by , 10 years ago) |
---|
-
shared_mutex.hpp
14 14 #include <boost/static_assert.hpp> 15 15 #include <limits.h> 16 16 #include <boost/thread/thread_time.hpp> 17 #if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS 18 #include <boost/thread/detail/thread_interruption.hpp> 19 #endif 17 20 #ifdef BOOST_THREAD_USES_CHRONO 18 21 #include <boost/chrono/system_clocks.hpp> 19 22 #include <boost/chrono/ceil.hpp> … … 108 111 109 112 bool try_lock_shared() 110 113 { 114 #if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS 115 boost::this_thread::disable_interruption do_not_disturb; 116 #endif 111 117 state_data old_state=state; 112 118 for(;;) 113 119 { … … 133 139 134 140 void lock_shared() 135 141 { 142 #if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS 143 boost::this_thread::disable_interruption do_not_disturb; 144 #endif 136 145 BOOST_VERIFY(timed_lock_shared(::boost::detail::get_system_time_sentinel())); 137 146 } 138 147 … … 144 153 } 145 154 bool timed_lock_shared(boost::system_time const& wait_until) 146 155 { 156 #if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS 157 boost::this_thread::disable_interruption do_not_disturb; 158 #endif 147 159 for(;;) 148 160 { 149 161 state_data old_state=state; … … 245 257 } 246 258 bool try_lock_shared_until(const chrono::time_point<chrono::system_clock, chrono::system_clock::duration>& tp) 247 259 { 260 #if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS 261 boost::this_thread::disable_interruption do_not_disturb; 262 #endif 248 263 for(;;) 249 264 { 250 265 state_data old_state=state; … … 333 348 334 349 void unlock_shared() 335 350 { 351 #if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS 352 boost::this_thread::disable_interruption do_not_disturb; 353 #endif 336 354 state_data old_state=state; 337 355 for(;;) 338 356 { … … 390 408 391 409 bool try_lock() 392 410 { 411 #if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS 412 boost::this_thread::disable_interruption do_not_disturb; 413 #endif 393 414 state_data old_state=state; 394 415 for(;;) 395 416 { … … 416 437 417 438 bool timed_lock(boost::system_time const& wait_until) 418 439 { 440 #if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS 441 boost::this_thread::disable_interruption do_not_disturb; 442 #endif 419 443 for(;;) 420 444 { 421 445 state_data old_state=state; … … 516 540 } 517 541 bool try_lock_until(const chrono::time_point<chrono::system_clock, chrono::system_clock::duration>& tp) 518 542 { 543 #if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS 544 boost::this_thread::disable_interruption do_not_disturb; 545 #endif 519 546 for(;;) 520 547 { 521 548 state_data old_state=state; … … 605 632 606 633 void unlock() 607 634 { 635 #if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS 636 boost::this_thread::disable_interruption do_not_disturb; 637 #endif 608 638 state_data old_state=state; 609 639 for(;;) 610 640 { … … 629 659 630 660 void lock_upgrade() 631 661 { 662 #if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS 663 boost::this_thread::disable_interruption do_not_disturb; 664 #endif 632 665 for(;;) 633 666 { 634 667 state_data old_state=state; … … 672 705 673 706 bool try_lock_upgrade() 674 707 { 708 #if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS 709 boost::this_thread::disable_interruption do_not_disturb; 710 #endif 675 711 state_data old_state=state; 676 712 for(;;) 677 713 { … … 702 738 703 739 void unlock_upgrade() 704 740 { 741 #if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS 742 boost::this_thread::disable_interruption do_not_disturb; 743 #endif 705 744 state_data old_state=state; 706 745 for(;;) 707 746 { … … 736 775 737 776 void unlock_upgrade_and_lock() 738 777 { 778 #if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS 779 boost::this_thread::disable_interruption do_not_disturb; 780 #endif 739 781 state_data old_state=state; 740 782 for(;;) 741 783 { … … 763 805 764 806 void unlock_and_lock_upgrade() 765 807 { 808 #if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS 809 boost::this_thread::disable_interruption do_not_disturb; 810 #endif 766 811 state_data old_state=state; 767 812 for(;;) 768 813 { … … 810 855 811 856 void unlock_and_lock_shared() 812 857 { 858 #if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS 859 boost::this_thread::disable_interruption do_not_disturb; 860 #endif 813 861 state_data old_state=state; 814 862 for(;;) 815 863 { … … 834 882 } 835 883 void unlock_upgrade_and_lock_shared() 836 884 { 885 #if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS 886 boost::this_thread::disable_interruption do_not_disturb; 887 #endif 837 888 state_data old_state=state; 838 889 for(;;) 839 890 {