Ticket #7755: 7755.patch
File 7755.patch, 2.2 KB (added by , 10 years ago) |
---|
-
shared_mutex.hpp
471 471 { 472 472 for(;;) 473 473 { 474 bool must_notify = false; 474 475 state_data new_state=old_state; 475 476 if(new_state.shared_count || new_state.exclusive) 476 477 { … … 479 480 if(!--new_state.exclusive_waiting) 480 481 { 481 482 new_state.exclusive_waiting_blocked=false; 483 must_notify = true; 482 484 } 483 485 } 484 486 } … … 488 490 } 489 491 490 492 state_data const current_state=interlocked_compare_exchange(&state,new_state,old_state); 493 if (must_notify) 494 { 495 BOOST_VERIFY(detail::win32::ReleaseSemaphore(semaphores[unlock_sem],1,0)!=0); 496 } 497 491 498 if(current_state==old_state) 492 499 { 493 500 break; … … 580 587 { 581 588 for(;;) 582 589 { 590 bool must_notify = false; 583 591 state_data new_state=old_state; 584 592 if(new_state.shared_count || new_state.exclusive) 585 593 { … … 588 596 if(!--new_state.exclusive_waiting) 589 597 { 590 598 new_state.exclusive_waiting_blocked=false; 599 must_notify = true; 591 600 } 592 601 } 593 602 } … … 597 606 } 598 607 599 608 state_data const current_state=interlocked_compare_exchange(&state,new_state,old_state); 609 if (must_notify) 610 { 611 BOOST_VERIFY(detail::win32::ReleaseSemaphore(semaphores[unlock_sem],1,0)!=0); 612 } 600 613 if(current_state==old_state) 601 614 { 602 615 break;