summaryrefslogtreecommitdiff
path: root/boost/thread/win32/shared_mutex.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'boost/thread/win32/shared_mutex.hpp')
-rw-r--r--boost/thread/win32/shared_mutex.hpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/boost/thread/win32/shared_mutex.hpp b/boost/thread/win32/shared_mutex.hpp
index fff97b7355..b7822d1142 100644
--- a/boost/thread/win32/shared_mutex.hpp
+++ b/boost/thread/win32/shared_mutex.hpp
@@ -139,6 +139,7 @@ namespace boost
void lock_shared()
{
+
#if defined BOOST_THREAD_USES_DATETIME
BOOST_VERIFY(timed_lock_shared(::boost::detail::get_system_time_sentinel()));
#else
@@ -389,6 +390,7 @@ namespace boost
void lock()
{
+
#if defined BOOST_THREAD_USES_DATETIME
BOOST_VERIFY(timed_lock(::boost::detail::get_system_time_sentinel()));
#else
@@ -739,6 +741,7 @@ namespace boost
new_state.upgrade=false;
bool const last_reader=!--new_state.shared_count;
+ new_state.shared_waiting=0;
if(last_reader)
{
if(new_state.exclusive_waiting)
@@ -746,7 +749,6 @@ namespace boost
--new_state.exclusive_waiting;
new_state.exclusive_waiting_blocked=false;
}
- new_state.shared_waiting=0;
}
state_data const current_state=interlocked_compare_exchange(&state,new_state,old_state);