|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r85774 - in trunk/boost/sync/detail: event semaphore
From: tim_at_[hidden]
Date: 2013-09-18 07:39:14
Author: timblechmann
Date: 2013-09-18 07:39:14 EDT (Wed, 18 Sep 2013)
New Revision: 85774
URL: http://svn.boost.org/trac/boost/changeset/85774
Log:
sync: windows - compile fix for event/semaphore
Text files modified:
trunk/boost/sync/detail/event/event_windows.hpp | 7 +++++++
trunk/boost/sync/detail/semaphore/semaphore_windows.hpp | 17 ++++++++++++-----
2 files changed, 19 insertions(+), 5 deletions(-)
Modified: trunk/boost/sync/detail/event/event_windows.hpp
==============================================================================
--- trunk/boost/sync/detail/event/event_windows.hpp Wed Sep 18 07:38:52 2013 (r85773)
+++ trunk/boost/sync/detail/event/event_windows.hpp 2013-09-18 07:39:14 EDT (Wed, 18 Sep 2013) (r85774)
@@ -35,6 +35,13 @@
typedef boost::detail::win32::BOOL_ BOOL_;
typedef boost::detail::win32::DWORD_ DWORD_;
+ 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 event(bool auto_reset = false)
{
Modified: trunk/boost/sync/detail/semaphore/semaphore_windows.hpp
==============================================================================
--- trunk/boost/sync/detail/semaphore/semaphore_windows.hpp Wed Sep 18 07:38:52 2013 (r85773)
+++ trunk/boost/sync/detail/semaphore/semaphore_windows.hpp 2013-09-18 07:39:14 EDT (Wed, 18 Sep 2013) (r85774)
@@ -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)
{
@@ -70,10 +77,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"));
@@ -112,13 +119,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