Index: grammar.ipp =================================================================== --- grammar.ipp (revision 2) +++ grammar.ipp (working copy) @@ -23,6 +23,7 @@ #include #include #include +#include #endif /////////////////////////////////////////////////////////////////////////////// @@ -178,7 +179,7 @@ result(new definition_t(target_grammar->derived())); #ifdef BOOST_SPIRIT_THREADSAFE - boost::mutex::scoped_lock lock(helpers.mutex()); + boost::unique_lock lock(helpers.mutex()); #endif helpers.push_back(this); Index: object_with_id.ipp =================================================================== --- object_with_id.ipp (revision 2) +++ object_with_id.ipp (working copy) @@ -15,6 +15,7 @@ #ifdef BOOST_SPIRIT_THREADSAFE #include +#include #include #endif @@ -99,7 +100,7 @@ object_with_id_base_supply::acquire() { #ifdef BOOST_SPIRIT_THREADSAFE - boost::mutex::scoped_lock lock(mutex); + boost::unique_lock lock(mutex); #endif if (free_ids.size()) { @@ -121,7 +122,7 @@ object_with_id_base_supply::release(IdT id) { #ifdef BOOST_SPIRIT_THREADSAFE - boost::mutex::scoped_lock lock(mutex); + boost::unique_lock lock(mutex); #endif if (max_id == id) max_id--; @@ -139,7 +140,7 @@ static boost::once_flag been_here = BOOST_ONCE_INIT; boost::call_once(been_here, mutex_init); boost::mutex &mutex = mutex_instance(); - boost::mutex::scoped_lock lock(mutex); + boost::unique_lock lock(mutex); #endif static boost::shared_ptr > static_supply;