|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r53193 - trunk/boost/spirit/home/support/iterators/detail
From: hartmut.kaiser_at_[hidden]
Date: 2009-05-23 00:06:01
Author: hkaiser
Date: 2009-05-23 00:06:00 EDT (Sat, 23 May 2009)
New Revision: 53193
URL: http://svn.boost.org/trac/boost/changeset/53193
Log:
Spirit: Added thread safety precaution
Text files modified:
trunk/boost/spirit/home/support/iterators/detail/ref_counted_policy.hpp | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
Modified: trunk/boost/spirit/home/support/iterators/detail/ref_counted_policy.hpp
==============================================================================
--- trunk/boost/spirit/home/support/iterators/detail/ref_counted_policy.hpp (original)
+++ trunk/boost/spirit/home/support/iterators/detail/ref_counted_policy.hpp 2009-05-23 00:06:00 EDT (Sat, 23 May 2009)
@@ -9,6 +9,9 @@
#include <boost/spirit/home/support/iterators/multi_pass_fwd.hpp>
#include <boost/spirit/home/support/iterators/detail/multi_pass.hpp>
+#if defined(BOOST_HAS_THREADS)
+#include <boost/detail/atomic_count.hpp>
+#endif
#include <cstdlib>
namespace boost { namespace spirit { namespace iterator_policies
@@ -61,7 +64,12 @@
struct shared
{
shared() : count(1) {}
+
+#if defined(BOOST_HAS_THREADS)
+ boost::detail::atomic_count count;
+#else
std::size_t count;
+#endif
};
};
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