|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r77396 - trunk/boost/thread/win32
From: vicente.botet_at_[hidden]
Date: 2012-03-18 19:42:24
Author: viboes
Date: 2012-03-18 19:42:23 EDT (Sun, 18 Mar 2012)
New Revision: 77396
URL: http://svn.boost.org/trac/boost/changeset/77396
Log:
Thread: Added upgrade_mutex on windows
Text files modified:
trunk/boost/thread/win32/shared_mutex.hpp | 58 +++++++++++++++++----------------------
1 files changed, 25 insertions(+), 33 deletions(-)
Modified: trunk/boost/thread/win32/shared_mutex.hpp
==============================================================================
--- trunk/boost/thread/win32/shared_mutex.hpp (original)
+++ trunk/boost/thread/win32/shared_mutex.hpp 2012-03-18 19:42:23 EDT (Sun, 18 Mar 2012)
@@ -789,17 +789,28 @@
}
release_waiters(old_state);
}
-#if 0 // To be added
- bool try_unlock_upgrade_and_lock();
- template <class Rep, class Period>
- bool
- try_unlock_upgrade_and_lock_for(
- const chrono::duration<Rep, Period>& rel_time);
- template <class Clock, class Duration>
- bool
- try_unlock_upgrade_and_lock_until(
- const chrono::time_point<Clock, Duration>& abs_time);
-#endif
+// bool try_unlock_upgrade_and_lock()
+// {
+// return false;
+// }
+//#ifdef BOOST_THREAD_USES_CHRONO
+// template <class Rep, class Period>
+// bool
+// try_unlock_upgrade_and_lock_for(
+// const chrono::duration<Rep, Period>& rel_time)
+// {
+// return try_unlock_upgrade_and_lock_until(
+// chrono::steady_clock::now() + rel_time);
+// }
+// template <class Clock, class Duration>
+// bool
+// try_unlock_upgrade_and_lock_until(
+// const chrono::time_point<Clock, Duration>& abs_time)
+// {
+// return false;
+// }
+//#endif
+
void unlock_and_lock_shared()
{
state_data old_state=state;
@@ -824,17 +835,6 @@
}
release_waiters(old_state);
}
-#if 0 // To be added
- bool try_unlock_shared_and_lock();
- template <class Rep, class Period>
- bool
- try_unlock_shared_and_lock_for(
- const chrono::duration<Rep, Period>& rel_time);
- template <class Clock, class Duration>
- bool
- try_unlock_shared_and_lock_until(
- const chrono::time_point<Clock, Duration>& abs_time);
-#endif
void unlock_upgrade_and_lock_shared()
{
state_data old_state=state;
@@ -858,18 +858,10 @@
}
release_waiters(old_state);
}
-#if 0 // To be added
- bool try_unlock_shared_and_lock_upgrade();
- template <class Rep, class Period>
- bool
- try_unlock_shared_and_lock_upgrade_for(
- const chrono::duration<Rep, Period>& rel_time);
- template <class Clock, class Duration>
- bool
- try_unlock_shared_and_lock_upgrade_until(
- const chrono::time_point<Clock, Duration>& abs_time);
-#endif
+
};
+ typedef shared_mutex upgrade_mutex;
+
}
#include <boost/config/abi_suffix.hpp>
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk