summaryrefslogtreecommitdiff
path: root/boost/container/detail/mutex.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'boost/container/detail/mutex.hpp')
-rw-r--r--boost/container/detail/mutex.hpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/boost/container/detail/mutex.hpp b/boost/container/detail/mutex.hpp
index c53afa1..f8efa7f 100644
--- a/boost/container/detail/mutex.hpp
+++ b/boost/container/detail/mutex.hpp
@@ -19,7 +19,11 @@
#ifndef BOOST_CONTAINER_MUTEX_HPP
#define BOOST_CONTAINER_MUTEX_HPP
-#if defined(_MSC_VER)
+#ifndef BOOST_CONFIG_HPP
+# include <boost/config.hpp>
+#endif
+
+#if defined(BOOST_HAS_PRAGMA_ONCE)
# pragma once
#endif
@@ -162,7 +166,7 @@
#define BOOST_CONTAINER_TRY_LOCK(sl) !BOOST_CONTAINER_CAS_LOCK(sl)
#define BOOST_CONTAINER_RELEASE_LOCK(sl) BOOST_CONTAINER_CLEAR_LOCK(sl)
#define BOOST_CONTAINER_ACQUIRE_LOCK(sl) (BOOST_CONTAINER_CAS_LOCK(sl)? boost_interprocess_spin_acquire_lock(sl) : 0)
- #define BOOST_CONTAINER_INITIAL_LOCK(sl) (*sl = 0)
+ #define BOOST_MOVE_INITIAL_LOCK(sl) (*sl = 0)
#define BOOST_CONTAINER_DESTROY_LOCK(sl) (0)
#elif BOOST_MUTEX_HELPER == BOOST_MUTEX_HELPER_WIN32
//
@@ -199,7 +203,7 @@ namespace container_detail {
void operator=(const spin_mutex &);
public:
- spin_mutex() { BOOST_CONTAINER_INITIAL_LOCK(&sl); }
+ spin_mutex() { BOOST_MOVE_INITIAL_LOCK(&sl); }
void lock() { BOOST_CONTAINER_ACQUIRE_LOCK(&sl); }
void unlock() { BOOST_CONTAINER_RELEASE_LOCK(&sl); }