|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r84710 - trunk/boost/thread/win32
From: vicente.botet_at_[hidden]
Date: 2013-06-09 04:28:28
Author: viboes
Date: 2013-06-09 04:28:28 EDT (Sun, 09 Jun 2013)
New Revision: 84710
URL: http://svn.boost.org/trac/boost/changeset/84710
Log:
Thread: take in account wait_abandoned.
Text files modified:
trunk/boost/thread/win32/basic_timed_mutex.hpp | 6 ++++--
trunk/boost/thread/win32/thread_primitives.hpp | 3 +++
2 files changed, 7 insertions(+), 2 deletions(-)
Modified: trunk/boost/thread/win32/basic_timed_mutex.hpp
==============================================================================
--- trunk/boost/thread/win32/basic_timed_mutex.hpp Sun Jun 9 04:27:00 2013 (r84709)
+++ trunk/boost/thread/win32/basic_timed_mutex.hpp 2013-06-09 04:28:28 EDT (Sun, 09 Jun 2013) (r84710)
@@ -81,8 +81,10 @@
do
{
- BOOST_VERIFY(win32::WaitForSingleObject(
- sem,::boost::detail::win32::infinite)==0);
+ unsigned const retval(win32::WaitForSingleObject(sem, ::boost::detail::win32::infinite));
+ BOOST_VERIFY(0 == retval || ::boost::detail::win32::wait_abandoned == retval);
+// BOOST_VERIFY(win32::WaitForSingleObject(
+// sem,::boost::detail::win32::infinite)==0);
clear_waiting_and_try_lock(old_count);
lock_acquired=!(old_count&lock_flag_value);
}
Modified: trunk/boost/thread/win32/thread_primitives.hpp
==============================================================================
--- trunk/boost/thread/win32/thread_primitives.hpp Sun Jun 9 04:27:00 2013 (r84709)
+++ trunk/boost/thread/win32/thread_primitives.hpp 2013-06-09 04:28:28 EDT (Sun, 09 Jun 2013) (r84710)
@@ -44,6 +44,8 @@
handle const invalid_handle_value=INVALID_HANDLE_VALUE;
unsigned const event_modify_state=EVENT_MODIFY_STATE;
unsigned const synchronize=SYNCHRONIZE;
+ unsigned const wait_abandoned=WAIT_ABANDONED;
+
# ifdef BOOST_NO_ANSI_APIS
using ::CreateMutexW;
@@ -127,6 +129,7 @@
handle const invalid_handle_value=(handle)(-1);
unsigned const event_modify_state=2;
unsigned const synchronize=0x100000u;
+ unsigned const wait_abandoned=0x00000080u;
extern "C"
{
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