|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r85776 - trunk/boost/sync/detail/event
From: tim_at_[hidden]
Date: 2013-09-18 09:04:51
Author: timblechmann
Date: 2013-09-18 09:04:51 EDT (Wed, 18 Sep 2013)
New Revision: 85776
URL: http://svn.boost.org/trac/boost/changeset/85776
Log:
sync: event - mach event fixes
Text files modified:
trunk/boost/sync/detail/event/event_mach.hpp | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
Modified: trunk/boost/sync/detail/event/event_mach.hpp
==============================================================================
--- trunk/boost/sync/detail/event/event_mach.hpp Wed Sep 18 08:20:12 2013 (r85775)
+++ trunk/boost/sync/detail/event/event_mach.hpp 2013-09-18 09:04:51 EDT (Wed, 18 Sep 2013) (r85776)
@@ -14,7 +14,6 @@
#include <boost/sync/detail/config.hpp>
#include <boost/sync/exceptions/resource_error.hpp>
-#include <boost/sync/detail/header.hpp>
#include <mach/task.h>
#include <mach/semaphore.h>
@@ -23,6 +22,8 @@
#include <boost/atomic.hpp>
+#include <boost/sync/detail/header.hpp>
+
namespace boost {
namespace sync {
@@ -72,14 +73,13 @@
try_again:
kern_return_t result = semaphore_wait( m_sem );
+ BOOST_VERIFY (result == KERN_SUCCESS);
- if (result == KERN_SUCCESS) {
- bool isTrue = true;
- bool firstWaiter = m_signaled.compare_exchange_strong(isTrue, false);
+ bool isTrue = true;
+ bool firstWaiter = m_signaled.compare_exchange_strong(isTrue, false);
- if (firstWaiter) // only the first waiter succeeds
- return;
- }
+ if (firstWaiter) // only the first waiter succeeds
+ return;
goto try_again;
} else {
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