|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r66009 - trunk/boost/asio/detail/impl
From: chris_at_[hidden]
Date: 2010-10-16 06:01:18
Author: chris_kohlhoff
Date: 2010-10-16 06:01:14 EDT (Sat, 16 Oct 2010)
New Revision: 66009
URL: http://svn.boost.org/trac/boost/changeset/66009
Log:
Check return code of InitializeCriticalSectionAndSpinCount. Refs #4574.
Text files modified:
trunk/boost/asio/detail/impl/win_mutex.ipp | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
Modified: trunk/boost/asio/detail/impl/win_mutex.ipp
==============================================================================
--- trunk/boost/asio/detail/impl/win_mutex.ipp (original)
+++ trunk/boost/asio/detail/impl/win_mutex.ipp 2010-10-16 06:01:14 EDT (Sat, 16 Oct 2010)
@@ -45,7 +45,8 @@
# if defined(UNDER_CE)
::InitializeCriticalSection(&crit_section_);
# else
- ::InitializeCriticalSectionAndSpinCount(&crit_section_, 0x80000000);
+ if (!::InitializeCriticalSectionAndSpinCount(&crit_section_, 0x80000000))
+ return ::GetLastError();
# endif
return 0;
#else
@@ -54,7 +55,8 @@
# if defined(UNDER_CE)
::InitializeCriticalSection(&crit_section_);
# else
- ::InitializeCriticalSectionAndSpinCount(&crit_section_, 0x80000000);
+ if (!::InitializeCriticalSectionAndSpinCount(&crit_section_, 0x80000000))
+ return ::GetLastError();
# endif
}
__except(GetExceptionCode() == STATUS_NO_MEMORY
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