Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r85789 - trunk/boost/sync/detail/semaphore
From: tim_at_[hidden]
Date: 2013-09-19 05:04:19


Author: timblechmann
Date: 2013-09-19 05:04:19 EDT (Thu, 19 Sep 2013)
New Revision: 85789
URL: http://svn.boost.org/trac/boost/changeset/85789

Log:
sync: semaphore - partially revert r85779

Text files modified:
   trunk/boost/sync/detail/semaphore/semaphore_windows.hpp | 17 ++++++++++++-----
   1 files changed, 12 insertions(+), 5 deletions(-)

Modified: trunk/boost/sync/detail/semaphore/semaphore_windows.hpp
==============================================================================
--- trunk/boost/sync/detail/semaphore/semaphore_windows.hpp Thu Sep 19 05:00:49 2013 (r85788)
+++ trunk/boost/sync/detail/semaphore/semaphore_windows.hpp 2013-09-19 05:04:19 EDT (Thu, 19 Sep 2013) (r85789)
@@ -39,6 +39,13 @@
     typedef boost::detail::win32::LONG_ LONG_;
     typedef boost::detail::win32::BOOL_ BOOL_;
 
+ static const DWORD_ infinite = (DWORD_)0xFFFFFFFF;
+ static const DWORD_ wait_abandoned = 0x00000080L;
+ static const DWORD_ wait_object_0 = 0x00000000L;
+ static const DWORD_ wait_timeout = 0x00000102L;
+ static const DWORD_ wait_failed = (DWORD_)0xFFFFFFFF;
+
+
 public:
     explicit semaphore(unsigned int i = 0)
     {
@@ -71,10 +78,10 @@
     {
         switch (boost::detail::win32::WaitForSingleObject(m_sem, boost::detail::win32::infinite))
         {
- case boost::detail::win32::wait_object_0:
+ case wait_object_0:
             return true;
 
- case boost::detail::win32::wait_failed:
+ case wait_failed:
             {
                 const DWORD_ err = boost::detail::win32::GetLastError();
                 BOOST_THROW_EXCEPTION(resource_error(err, "boost::sync::semaphore::wait failed in WaitForSingleObject"));
@@ -113,13 +120,13 @@
     {
         switch (boost::detail::win32::WaitForSingleObject(m_sem, milliseconds))
         {
- case boost::detail::win32::wait_object_0:
+ case wait_object_0:
             return true;
 
- case boost::detail::win32::wait_timeout:
+ case wait_timeout:
             return false;
 
- case boost::detail::win32::wait_failed:
+ case wait_failed:
             {
                 const DWORD_ err = boost::detail::win32::GetLastError();
                 BOOST_THROW_EXCEPTION(resource_error(err, "boost::sync::semaphore::do_try_wait_for failed in WaitForSingleObject"));


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