summaryrefslogtreecommitdiff
path: root/boost/interprocess/sync
diff options
context:
space:
mode:
Diffstat (limited to 'boost/interprocess/sync')
-rw-r--r--boost/interprocess/sync/detail/common_algorithms.hpp6
-rw-r--r--boost/interprocess/sync/detail/condition_algorithm_8a.hpp6
-rw-r--r--boost/interprocess/sync/detail/condition_any_algorithm.hpp6
-rw-r--r--boost/interprocess/sync/detail/locks.hpp6
-rw-r--r--boost/interprocess/sync/file_lock.hpp6
-rw-r--r--boost/interprocess/sync/interprocess_condition.hpp6
-rw-r--r--boost/interprocess/sync/interprocess_condition_any.hpp6
-rw-r--r--boost/interprocess/sync/interprocess_mutex.hpp6
-rw-r--r--boost/interprocess/sync/interprocess_recursive_mutex.hpp6
-rw-r--r--boost/interprocess/sync/interprocess_semaphore.hpp8
-rw-r--r--boost/interprocess/sync/interprocess_sharable_mutex.hpp6
-rw-r--r--boost/interprocess/sync/interprocess_upgradable_mutex.hpp6
-rw-r--r--boost/interprocess/sync/lock_options.hpp6
-rw-r--r--boost/interprocess/sync/mutex_family.hpp6
-rw-r--r--boost/interprocess/sync/named_condition.hpp6
-rw-r--r--boost/interprocess/sync/named_condition_any.hpp6
-rw-r--r--boost/interprocess/sync/named_mutex.hpp6
-rw-r--r--boost/interprocess/sync/named_recursive_mutex.hpp6
-rw-r--r--boost/interprocess/sync/named_semaphore.hpp6
-rw-r--r--boost/interprocess/sync/named_sharable_mutex.hpp6
-rw-r--r--boost/interprocess/sync/named_upgradable_mutex.hpp6
-rw-r--r--boost/interprocess/sync/null_mutex.hpp6
-rw-r--r--boost/interprocess/sync/posix/condition.hpp6
-rw-r--r--boost/interprocess/sync/posix/mutex.hpp6
-rw-r--r--boost/interprocess/sync/posix/named_mutex.hpp6
-rw-r--r--boost/interprocess/sync/posix/named_semaphore.hpp6
-rw-r--r--boost/interprocess/sync/posix/pthread_helpers.hpp6
-rw-r--r--boost/interprocess/sync/posix/ptime_to_timespec.hpp6
-rw-r--r--boost/interprocess/sync/posix/recursive_mutex.hpp6
-rw-r--r--boost/interprocess/sync/posix/semaphore.hpp6
-rw-r--r--boost/interprocess/sync/posix/semaphore_wrapper.hpp14
-rw-r--r--boost/interprocess/sync/scoped_lock.hpp11
-rw-r--r--boost/interprocess/sync/sharable_lock.hpp11
-rw-r--r--boost/interprocess/sync/shm/named_condition.hpp6
-rw-r--r--boost/interprocess/sync/shm/named_condition_any.hpp6
-rw-r--r--boost/interprocess/sync/shm/named_creation_functor.hpp11
-rw-r--r--boost/interprocess/sync/shm/named_mutex.hpp6
-rw-r--r--boost/interprocess/sync/shm/named_recursive_mutex.hpp6
-rw-r--r--boost/interprocess/sync/shm/named_semaphore.hpp6
-rw-r--r--boost/interprocess/sync/shm/named_upgradable_mutex.hpp6
-rw-r--r--boost/interprocess/sync/spin/condition.hpp6
-rw-r--r--boost/interprocess/sync/spin/interprocess_barrier.hpp6
-rw-r--r--boost/interprocess/sync/spin/mutex.hpp6
-rw-r--r--boost/interprocess/sync/spin/recursive_mutex.hpp6
-rw-r--r--boost/interprocess/sync/spin/semaphore.hpp6
-rw-r--r--boost/interprocess/sync/spin/wait.hpp6
-rw-r--r--boost/interprocess/sync/upgradable_lock.hpp10
-rw-r--r--boost/interprocess/sync/windows/condition.hpp6
-rw-r--r--boost/interprocess/sync/windows/mutex.hpp6
-rw-r--r--boost/interprocess/sync/windows/named_condition.hpp6
-rw-r--r--boost/interprocess/sync/windows/named_condition_any.hpp6
-rw-r--r--boost/interprocess/sync/windows/named_mutex.hpp6
-rw-r--r--boost/interprocess/sync/windows/named_recursive_mutex.hpp6
-rw-r--r--boost/interprocess/sync/windows/named_semaphore.hpp6
-rw-r--r--boost/interprocess/sync/windows/named_sync.hpp6
-rw-r--r--boost/interprocess/sync/windows/recursive_mutex.hpp6
-rw-r--r--boost/interprocess/sync/windows/semaphore.hpp6
-rw-r--r--boost/interprocess/sync/windows/sync_utils.hpp6
-rw-r--r--boost/interprocess/sync/windows/winapi_mutex_wrapper.hpp6
-rw-r--r--boost/interprocess/sync/windows/winapi_semaphore_wrapper.hpp6
-rw-r--r--boost/interprocess/sync/windows/winapi_wrapper_common.hpp6
-rw-r--r--boost/interprocess/sync/xsi/advanced_xsi_semaphore.hpp6
-rw-r--r--boost/interprocess/sync/xsi/simple_xsi_semaphore.hpp6
-rw-r--r--boost/interprocess/sync/xsi/xsi_named_mutex.hpp18
64 files changed, 347 insertions, 78 deletions
diff --git a/boost/interprocess/sync/detail/common_algorithms.hpp b/boost/interprocess/sync/detail/common_algorithms.hpp
index 76d1c5c9e8..1a72d686b4 100644
--- a/boost/interprocess/sync/detail/common_algorithms.hpp
+++ b/boost/interprocess/sync/detail/common_algorithms.hpp
@@ -11,7 +11,11 @@
#ifndef BOOST_INTERPROCESS_SYNC_DETAIL_COMMON_ALGORITHMS_HPP
#define BOOST_INTERPROCESS_SYNC_DETAIL_COMMON_ALGORITHMS_HPP
-#if defined(_MSC_VER)
+#ifndef BOOST_CONFIG_HPP
+# include <boost/config.hpp>
+#endif
+#
+#if defined(BOOST_HAS_PRAGMA_ONCE)
# pragma once
#endif
diff --git a/boost/interprocess/sync/detail/condition_algorithm_8a.hpp b/boost/interprocess/sync/detail/condition_algorithm_8a.hpp
index be93af7b8f..9978309b96 100644
--- a/boost/interprocess/sync/detail/condition_algorithm_8a.hpp
+++ b/boost/interprocess/sync/detail/condition_algorithm_8a.hpp
@@ -11,7 +11,11 @@
#ifndef BOOST_INTERPROCESS_DETAIL_CONDITION_ALGORITHM_8A_HPP
#define BOOST_INTERPROCESS_DETAIL_CONDITION_ALGORITHM_8A_HPP
-#if defined(_MSC_VER)
+#ifndef BOOST_CONFIG_HPP
+# include <boost/config.hpp>
+#endif
+#
+#if defined(BOOST_HAS_PRAGMA_ONCE)
# pragma once
#endif
diff --git a/boost/interprocess/sync/detail/condition_any_algorithm.hpp b/boost/interprocess/sync/detail/condition_any_algorithm.hpp
index 5819acfa28..6e94a84828 100644
--- a/boost/interprocess/sync/detail/condition_any_algorithm.hpp
+++ b/boost/interprocess/sync/detail/condition_any_algorithm.hpp
@@ -11,7 +11,11 @@
#ifndef BOOST_INTERPROCESS_DETAIL_CONDITION_ANY_ALGORITHM_HPP
#define BOOST_INTERPROCESS_DETAIL_CONDITION_ANY_ALGORITHM_HPP
-#if defined(_MSC_VER)
+#ifndef BOOST_CONFIG_HPP
+# include <boost/config.hpp>
+#endif
+#
+#if defined(BOOST_HAS_PRAGMA_ONCE)
# pragma once
#endif
diff --git a/boost/interprocess/sync/detail/locks.hpp b/boost/interprocess/sync/detail/locks.hpp
index 05652003a8..88d9c0cb48 100644
--- a/boost/interprocess/sync/detail/locks.hpp
+++ b/boost/interprocess/sync/detail/locks.hpp
@@ -11,7 +11,11 @@
#ifndef BOOST_INTERPROCESS_DETAIL_LOCKS_HPP
#define BOOST_INTERPROCESS_DETAIL_LOCKS_HPP
-#if defined(_MSC_VER)
+#ifndef BOOST_CONFIG_HPP
+# include <boost/config.hpp>
+#endif
+#
+#if defined(BOOST_HAS_PRAGMA_ONCE)
# pragma once
#endif
diff --git a/boost/interprocess/sync/file_lock.hpp b/boost/interprocess/sync/file_lock.hpp
index e8d3903dbe..a488b5ba59 100644
--- a/boost/interprocess/sync/file_lock.hpp
+++ b/boost/interprocess/sync/file_lock.hpp
@@ -11,7 +11,11 @@
#ifndef BOOST_INTERPROCESS_FILE_LOCK_HPP
#define BOOST_INTERPROCESS_FILE_LOCK_HPP
-#if defined(_MSC_VER)
+#ifndef BOOST_CONFIG_HPP
+# include <boost/config.hpp>
+#endif
+#
+#if defined(BOOST_HAS_PRAGMA_ONCE)
# pragma once
#endif
diff --git a/boost/interprocess/sync/interprocess_condition.hpp b/boost/interprocess/sync/interprocess_condition.hpp
index 19fba30762..c98ece8821 100644
--- a/boost/interprocess/sync/interprocess_condition.hpp
+++ b/boost/interprocess/sync/interprocess_condition.hpp
@@ -11,7 +11,11 @@
#ifndef BOOST_INTERPROCESS_CONDITION_HPP
#define BOOST_INTERPROCESS_CONDITION_HPP
-#if defined(_MSC_VER)
+#ifndef BOOST_CONFIG_HPP
+# include <boost/config.hpp>
+#endif
+#
+#if defined(BOOST_HAS_PRAGMA_ONCE)
# pragma once
#endif
diff --git a/boost/interprocess/sync/interprocess_condition_any.hpp b/boost/interprocess/sync/interprocess_condition_any.hpp
index 093d69cda2..899fd1d401 100644
--- a/boost/interprocess/sync/interprocess_condition_any.hpp
+++ b/boost/interprocess/sync/interprocess_condition_any.hpp
@@ -11,7 +11,11 @@
#ifndef BOOST_INTERPROCESS_CONDITION_ANY_HPP
#define BOOST_INTERPROCESS_CONDITION_ANY_HPP
-#if defined(_MSC_VER)
+#ifndef BOOST_CONFIG_HPP
+# include <boost/config.hpp>
+#endif
+#
+#if defined(BOOST_HAS_PRAGMA_ONCE)
# pragma once
#endif
diff --git a/boost/interprocess/sync/interprocess_mutex.hpp b/boost/interprocess/sync/interprocess_mutex.hpp
index f4f7258ad8..f3d52f9141 100644
--- a/boost/interprocess/sync/interprocess_mutex.hpp
+++ b/boost/interprocess/sync/interprocess_mutex.hpp
@@ -17,7 +17,11 @@
#if !defined(BOOST_INTERPROCESS_DOXYGEN_INVOKED)
-#if defined(_MSC_VER)
+#ifndef BOOST_CONFIG_HPP
+# include <boost/config.hpp>
+#endif
+#
+#if defined(BOOST_HAS_PRAGMA_ONCE)
# pragma once
#endif
diff --git a/boost/interprocess/sync/interprocess_recursive_mutex.hpp b/boost/interprocess/sync/interprocess_recursive_mutex.hpp
index fcc0e97228..5da0c1f3b7 100644
--- a/boost/interprocess/sync/interprocess_recursive_mutex.hpp
+++ b/boost/interprocess/sync/interprocess_recursive_mutex.hpp
@@ -29,7 +29,11 @@
#if !defined(BOOST_INTERPROCESS_DOXYGEN_INVOKED)
-#if defined(_MSC_VER)
+#ifndef BOOST_CONFIG_HPP
+# include <boost/config.hpp>
+#endif
+#
+#if defined(BOOST_HAS_PRAGMA_ONCE)
# pragma once
#endif
diff --git a/boost/interprocess/sync/interprocess_semaphore.hpp b/boost/interprocess/sync/interprocess_semaphore.hpp
index df65193ceb..8ae0c7933f 100644
--- a/boost/interprocess/sync/interprocess_semaphore.hpp
+++ b/boost/interprocess/sync/interprocess_semaphore.hpp
@@ -13,7 +13,11 @@
#if !defined(BOOST_INTERPROCESS_DOXYGEN_INVOKED)
-#if defined(_MSC_VER)
+#ifndef BOOST_CONFIG_HPP
+# include <boost/config.hpp>
+#endif
+#
+#if defined(BOOST_HAS_PRAGMA_ONCE)
# pragma once
#endif
@@ -25,7 +29,7 @@
#include <boost/interprocess/detail/posix_time_types_wrk.hpp>
#if !defined(BOOST_INTERPROCESS_FORCE_GENERIC_EMULATION) && \
- (defined(BOOST_INTERPROCESS_POSIX_PROCESS_SHARED) && defined(BOOST_INTERPROCESS_POSIX_NAMED_SEMAPHORES))
+ (defined(BOOST_INTERPROCESS_POSIX_PROCESS_SHARED) && defined(BOOST_INTERPROCESS_POSIX_UNNAMED_SEMAPHORES))
#include <boost/interprocess/sync/posix/semaphore.hpp>
#define BOOST_INTERPROCESS_USE_POSIX
//Experimental...
diff --git a/boost/interprocess/sync/interprocess_sharable_mutex.hpp b/boost/interprocess/sync/interprocess_sharable_mutex.hpp
index fbaf22a45f..59823b0c9b 100644
--- a/boost/interprocess/sync/interprocess_sharable_mutex.hpp
+++ b/boost/interprocess/sync/interprocess_sharable_mutex.hpp
@@ -15,7 +15,11 @@
#ifndef BOOST_INTERPROCESS_SHARABLE_MUTEX_HPP
#define BOOST_INTERPROCESS_SHARABLE_MUTEX_HPP
-#if defined(_MSC_VER)
+#ifndef BOOST_CONFIG_HPP
+# include <boost/config.hpp>
+#endif
+#
+#if defined(BOOST_HAS_PRAGMA_ONCE)
# pragma once
#endif
diff --git a/boost/interprocess/sync/interprocess_upgradable_mutex.hpp b/boost/interprocess/sync/interprocess_upgradable_mutex.hpp
index b90c71ef7f..15767d2c56 100644
--- a/boost/interprocess/sync/interprocess_upgradable_mutex.hpp
+++ b/boost/interprocess/sync/interprocess_upgradable_mutex.hpp
@@ -13,7 +13,11 @@
#ifndef BOOST_INTERPROCESS_UPGRADABLE_MUTEX_HPP
#define BOOST_INTERPROCESS_UPGRADABLE_MUTEX_HPP
-#if defined(_MSC_VER)
+#ifndef BOOST_CONFIG_HPP
+# include <boost/config.hpp>
+#endif
+#
+#if defined(BOOST_HAS_PRAGMA_ONCE)
# pragma once
#endif
diff --git a/boost/interprocess/sync/lock_options.hpp b/boost/interprocess/sync/lock_options.hpp
index 7e3305ba44..981ff5b6d3 100644
--- a/boost/interprocess/sync/lock_options.hpp
+++ b/boost/interprocess/sync/lock_options.hpp
@@ -11,7 +11,11 @@
#ifndef BOOST_INTERPROCESS_LOCK_OPTIONS_HPP
#define BOOST_INTERPROCESS_LOCK_OPTIONS_HPP
-#if defined(_MSC_VER)
+#ifndef BOOST_CONFIG_HPP
+# include <boost/config.hpp>
+#endif
+#
+#if defined(BOOST_HAS_PRAGMA_ONCE)
# pragma once
#endif
diff --git a/boost/interprocess/sync/mutex_family.hpp b/boost/interprocess/sync/mutex_family.hpp
index f19805f1b2..b136ce4418 100644
--- a/boost/interprocess/sync/mutex_family.hpp
+++ b/boost/interprocess/sync/mutex_family.hpp
@@ -11,7 +11,11 @@
#ifndef BOOST_INTERPROCESS_MUTEX_FAMILY_HPP
#define BOOST_INTERPROCESS_MUTEX_FAMILY_HPP
-#if defined(_MSC_VER)
+#ifndef BOOST_CONFIG_HPP
+# include <boost/config.hpp>
+#endif
+#
+#if defined(BOOST_HAS_PRAGMA_ONCE)
# pragma once
#endif
diff --git a/boost/interprocess/sync/named_condition.hpp b/boost/interprocess/sync/named_condition.hpp
index 4f0d61e253..6d9b7570d1 100644
--- a/boost/interprocess/sync/named_condition.hpp
+++ b/boost/interprocess/sync/named_condition.hpp
@@ -11,7 +11,11 @@
#ifndef BOOST_INTERPROCESS_NAMED_CONDITION_HPP
#define BOOST_INTERPROCESS_NAMED_CONDITION_HPP
-#if defined(_MSC_VER)
+#ifndef BOOST_CONFIG_HPP
+# include <boost/config.hpp>
+#endif
+#
+#if defined(BOOST_HAS_PRAGMA_ONCE)
# pragma once
#endif
diff --git a/boost/interprocess/sync/named_condition_any.hpp b/boost/interprocess/sync/named_condition_any.hpp
index 5d99d22ddd..a622470786 100644
--- a/boost/interprocess/sync/named_condition_any.hpp
+++ b/boost/interprocess/sync/named_condition_any.hpp
@@ -11,7 +11,11 @@
#ifndef BOOST_INTERPROCESS_NAMED_CONDITION_ANY_HPP
#define BOOST_INTERPROCESS_NAMED_CONDITION_ANY_HPP
-#if defined(_MSC_VER)
+#ifndef BOOST_CONFIG_HPP
+# include <boost/config.hpp>
+#endif
+#
+#if defined(BOOST_HAS_PRAGMA_ONCE)
# pragma once
#endif
diff --git a/boost/interprocess/sync/named_mutex.hpp b/boost/interprocess/sync/named_mutex.hpp
index e91b1f4d8f..127e8d8a8f 100644
--- a/boost/interprocess/sync/named_mutex.hpp
+++ b/boost/interprocess/sync/named_mutex.hpp
@@ -11,7 +11,11 @@
#ifndef BOOST_INTERPROCESS_NAMED_MUTEX_HPP
#define BOOST_INTERPROCESS_NAMED_MUTEX_HPP
-#if defined(_MSC_VER)
+#ifndef BOOST_CONFIG_HPP
+# include <boost/config.hpp>
+#endif
+#
+#if defined(BOOST_HAS_PRAGMA_ONCE)
# pragma once
#endif
diff --git a/boost/interprocess/sync/named_recursive_mutex.hpp b/boost/interprocess/sync/named_recursive_mutex.hpp
index f1f629dfcb..b2f1c200bf 100644
--- a/boost/interprocess/sync/named_recursive_mutex.hpp
+++ b/boost/interprocess/sync/named_recursive_mutex.hpp
@@ -11,7 +11,11 @@
#ifndef BOOST_INTERPROCESS_NAMED_RECURSIVE_MUTEX_HPP
#define BOOST_INTERPROCESS_NAMED_RECURSIVE_MUTEX_HPP
-#if defined(_MSC_VER)
+#ifndef BOOST_CONFIG_HPP
+# include <boost/config.hpp>
+#endif
+#
+#if defined(BOOST_HAS_PRAGMA_ONCE)
# pragma once
#endif
diff --git a/boost/interprocess/sync/named_semaphore.hpp b/boost/interprocess/sync/named_semaphore.hpp
index c4a421ec2b..1e56693a36 100644
--- a/boost/interprocess/sync/named_semaphore.hpp
+++ b/boost/interprocess/sync/named_semaphore.hpp
@@ -11,7 +11,11 @@
#ifndef BOOST_INTERPROCESS_NAMED_SEMAPHORE_HPP
#define BOOST_INTERPROCESS_NAMED_SEMAPHORE_HPP
-#if defined(_MSC_VER)
+#ifndef BOOST_CONFIG_HPP
+# include <boost/config.hpp>
+#endif
+#
+#if defined(BOOST_HAS_PRAGMA_ONCE)
# pragma once
#endif
diff --git a/boost/interprocess/sync/named_sharable_mutex.hpp b/boost/interprocess/sync/named_sharable_mutex.hpp
index f4c0aaaee9..a2dca1c415 100644
--- a/boost/interprocess/sync/named_sharable_mutex.hpp
+++ b/boost/interprocess/sync/named_sharable_mutex.hpp
@@ -11,7 +11,11 @@
#ifndef BOOST_INTERPROCESS_NAMED_SHARABLE_MUTEX_HPP
#define BOOST_INTERPROCESS_NAMED_SHARABLE_MUTEX_HPP
-#if defined(_MSC_VER)
+#ifndef BOOST_CONFIG_HPP
+# include <boost/config.hpp>
+#endif
+#
+#if defined(BOOST_HAS_PRAGMA_ONCE)
# pragma once
#endif
diff --git a/boost/interprocess/sync/named_upgradable_mutex.hpp b/boost/interprocess/sync/named_upgradable_mutex.hpp
index e313e72ed4..b285d1a42e 100644
--- a/boost/interprocess/sync/named_upgradable_mutex.hpp
+++ b/boost/interprocess/sync/named_upgradable_mutex.hpp
@@ -11,7 +11,11 @@
#ifndef BOOST_INTERPROCESS_named_upgradable_mutex_HPP
#define BOOST_INTERPROCESS_named_upgradable_mutex_HPP
-#if defined(_MSC_VER)
+#ifndef BOOST_CONFIG_HPP
+# include <boost/config.hpp>
+#endif
+#
+#if defined(BOOST_HAS_PRAGMA_ONCE)
# pragma once
#endif
diff --git a/boost/interprocess/sync/null_mutex.hpp b/boost/interprocess/sync/null_mutex.hpp
index 16db64b8d2..f3c29eb256 100644
--- a/boost/interprocess/sync/null_mutex.hpp
+++ b/boost/interprocess/sync/null_mutex.hpp
@@ -11,7 +11,11 @@
#ifndef BOOST_INTERPROCESS_NULL_MUTEX_HPP
#define BOOST_INTERPROCESS_NULL_MUTEX_HPP
-#if defined(_MSC_VER)
+#ifndef BOOST_CONFIG_HPP
+# include <boost/config.hpp>
+#endif
+#
+#if defined(BOOST_HAS_PRAGMA_ONCE)
# pragma once
#endif
diff --git a/boost/interprocess/sync/posix/condition.hpp b/boost/interprocess/sync/posix/condition.hpp
index e09fe4a109..5372d96891 100644
--- a/boost/interprocess/sync/posix/condition.hpp
+++ b/boost/interprocess/sync/posix/condition.hpp
@@ -11,7 +11,11 @@
#ifndef BOOST_INTERPROCESS_POSIX_CONDITION_HPP
#define BOOST_INTERPROCESS_POSIX_CONDITION_HPP
-#if defined(_MSC_VER)
+#ifndef BOOST_CONFIG_HPP
+# include <boost/config.hpp>
+#endif
+#
+#if defined(BOOST_HAS_PRAGMA_ONCE)
# pragma once
#endif
diff --git a/boost/interprocess/sync/posix/mutex.hpp b/boost/interprocess/sync/posix/mutex.hpp
index 4cd4207061..70adc23c96 100644
--- a/boost/interprocess/sync/posix/mutex.hpp
+++ b/boost/interprocess/sync/posix/mutex.hpp
@@ -27,7 +27,11 @@
#ifndef BOOST_INTERPROCESS_DETAIL_POSIX_MUTEX_HPP
#define BOOST_INTERPROCESS_DETAIL_POSIX_MUTEX_HPP
-#if defined(_MSC_VER)
+#ifndef BOOST_CONFIG_HPP
+# include <boost/config.hpp>
+#endif
+#
+#if defined(BOOST_HAS_PRAGMA_ONCE)
# pragma once
#endif
diff --git a/boost/interprocess/sync/posix/named_mutex.hpp b/boost/interprocess/sync/posix/named_mutex.hpp
index 2b3be2f8be..28fafa83ed 100644
--- a/boost/interprocess/sync/posix/named_mutex.hpp
+++ b/boost/interprocess/sync/posix/named_mutex.hpp
@@ -11,7 +11,11 @@
#ifndef BOOST_INTERPROCESS_POSIX_NAMED_MUTEX_HPP
#define BOOST_INTERPROCESS_POSIX_NAMED_MUTEX_HPP
-#if defined(_MSC_VER)
+#ifndef BOOST_CONFIG_HPP
+# include <boost/config.hpp>
+#endif
+#
+#if defined(BOOST_HAS_PRAGMA_ONCE)
# pragma once
#endif
diff --git a/boost/interprocess/sync/posix/named_semaphore.hpp b/boost/interprocess/sync/posix/named_semaphore.hpp
index 03510e3baa..8180da1e48 100644
--- a/boost/interprocess/sync/posix/named_semaphore.hpp
+++ b/boost/interprocess/sync/posix/named_semaphore.hpp
@@ -11,7 +11,11 @@
#ifndef BOOST_INTERPROCESS_POSIX_NAMED_CONDITION_HPP
#define BOOST_INTERPROCESS_POSIX_NAMED_CONDITION_HPP
-#if defined(_MSC_VER)
+#ifndef BOOST_CONFIG_HPP
+# include <boost/config.hpp>
+#endif
+#
+#if defined(BOOST_HAS_PRAGMA_ONCE)
# pragma once
#endif
diff --git a/boost/interprocess/sync/posix/pthread_helpers.hpp b/boost/interprocess/sync/posix/pthread_helpers.hpp
index ce859d7918..c615c851eb 100644
--- a/boost/interprocess/sync/posix/pthread_helpers.hpp
+++ b/boost/interprocess/sync/posix/pthread_helpers.hpp
@@ -11,7 +11,11 @@
#ifndef BOOST_INTERPROCESS_PTHREAD_HELPERS_HPP
#define BOOST_INTERPROCESS_PTHREAD_HELPERS_HPP
-#if defined(_MSC_VER)
+#ifndef BOOST_CONFIG_HPP
+# include <boost/config.hpp>
+#endif
+#
+#if defined(BOOST_HAS_PRAGMA_ONCE)
# pragma once
#endif
diff --git a/boost/interprocess/sync/posix/ptime_to_timespec.hpp b/boost/interprocess/sync/posix/ptime_to_timespec.hpp
index 65993de958..5aa09e0c19 100644
--- a/boost/interprocess/sync/posix/ptime_to_timespec.hpp
+++ b/boost/interprocess/sync/posix/ptime_to_timespec.hpp
@@ -11,7 +11,11 @@
#ifndef BOOST_INTERPROCESS_DETAIL_PTIME_TO_TIMESPEC_HPP
#define BOOST_INTERPROCESS_DETAIL_PTIME_TO_TIMESPEC_HPP
-#if defined(_MSC_VER)
+#ifndef BOOST_CONFIG_HPP
+# include <boost/config.hpp>
+#endif
+#
+#if defined(BOOST_HAS_PRAGMA_ONCE)
# pragma once
#endif
diff --git a/boost/interprocess/sync/posix/recursive_mutex.hpp b/boost/interprocess/sync/posix/recursive_mutex.hpp
index ccb50da286..9ef4f12788 100644
--- a/boost/interprocess/sync/posix/recursive_mutex.hpp
+++ b/boost/interprocess/sync/posix/recursive_mutex.hpp
@@ -27,7 +27,11 @@
#ifndef BOOST_INTERPROCESS_DETAIL_POSIX_RECURSIVE_MUTEX_HPP
#define BOOST_INTERPROCESS_DETAIL_POSIX_RECURSIVE_MUTEX_HPP
-#if defined(_MSC_VER)
+#ifndef BOOST_CONFIG_HPP
+# include <boost/config.hpp>
+#endif
+#
+#if defined(BOOST_HAS_PRAGMA_ONCE)
# pragma once
#endif
diff --git a/boost/interprocess/sync/posix/semaphore.hpp b/boost/interprocess/sync/posix/semaphore.hpp
index ba6a6f0eba..6fea766eda 100644
--- a/boost/interprocess/sync/posix/semaphore.hpp
+++ b/boost/interprocess/sync/posix/semaphore.hpp
@@ -11,7 +11,11 @@
#ifndef BOOST_INTERPROCESS_POSIX_SEMAPHORE_HPP
#define BOOST_INTERPROCESS_POSIX_SEMAPHORE_HPP
-#if defined(_MSC_VER)
+#ifndef BOOST_CONFIG_HPP
+# include <boost/config.hpp>
+#endif
+#
+#if defined(BOOST_HAS_PRAGMA_ONCE)
# pragma once
#endif
diff --git a/boost/interprocess/sync/posix/semaphore_wrapper.hpp b/boost/interprocess/sync/posix/semaphore_wrapper.hpp
index 33f55fae54..ca0f519b68 100644
--- a/boost/interprocess/sync/posix/semaphore_wrapper.hpp
+++ b/boost/interprocess/sync/posix/semaphore_wrapper.hpp
@@ -11,7 +11,11 @@
#ifndef BOOST_INTERPROCESS_POSIX_SEMAPHORE_WRAPPER_HPP
#define BOOST_INTERPROCESS_POSIX_SEMAPHORE_WRAPPER_HPP
-#if defined(_MSC_VER)
+#ifndef BOOST_CONFIG_HPP
+# include <boost/config.hpp>
+#endif
+#
+#if defined(BOOST_HAS_PRAGMA_ONCE)
# pragma once
#endif
@@ -47,6 +51,8 @@ namespace boost {
namespace interprocess {
namespace ipcdetail {
+#ifdef BOOST_INTERPROCESS_POSIX_NAMED_SEMAPHORES
+
inline bool semaphore_open
(sem_t *&handle, create_enum_t type, const char *origname,
unsigned int count = 0, const permissions &perm = permissions())
@@ -130,6 +136,10 @@ inline bool semaphore_unlink(const char *semname)
}
}
+#endif //BOOST_INTERPROCESS_POSIX_NAMED_SEMAPHORES
+
+#ifdef BOOST_INTERPROCESS_POSIX_UNNAMED_SEMAPHORES
+
inline void semaphore_init(sem_t *handle, unsigned int initialCount)
{
int ret = sem_init(handle, 1, initialCount);
@@ -150,6 +160,8 @@ inline void semaphore_destroy(sem_t *handle)
}
}
+#endif //BOOST_INTERPROCESS_POSIX_UNNAMED_SEMAPHORES
+
inline void semaphore_post(sem_t *handle)
{
int ret = sem_post(handle);
diff --git a/boost/interprocess/sync/scoped_lock.hpp b/boost/interprocess/sync/scoped_lock.hpp
index c095530274..97986f0361 100644
--- a/boost/interprocess/sync/scoped_lock.hpp
+++ b/boost/interprocess/sync/scoped_lock.hpp
@@ -16,7 +16,11 @@
#ifndef BOOST_INTERPROCESS_SCOPED_LOCK_HPP
#define BOOST_INTERPROCESS_SCOPED_LOCK_HPP
-#if defined(_MSC_VER)
+#ifndef BOOST_CONFIG_HPP
+# include <boost/config.hpp>
+#endif
+#
+#if defined(BOOST_HAS_PRAGMA_ONCE)
# pragma once
#endif
@@ -29,6 +33,7 @@
#include <boost/interprocess/detail/type_traits.hpp>
#include <boost/move/utility_core.hpp>
#include <boost/interprocess/detail/posix_time_types_wrk.hpp>
+#include <boost/interprocess/detail/simple_swap.hpp>
//!\file
//!Describes the scoped_lock class.
@@ -353,8 +358,8 @@ class scoped_lock
//!Throws: Nothing.
void swap( scoped_lock<mutex_type> &other)
{
- std::swap(mp_mutex, other.mp_mutex);
- std::swap(m_locked, other.m_locked);
+ (simple_swap)(mp_mutex, other.mp_mutex);
+ (simple_swap)(m_locked, other.m_locked);
}
#if !defined(BOOST_INTERPROCESS_DOXYGEN_INVOKED)
diff --git a/boost/interprocess/sync/sharable_lock.hpp b/boost/interprocess/sync/sharable_lock.hpp
index efbee6d10a..3df93ee1a0 100644
--- a/boost/interprocess/sync/sharable_lock.hpp
+++ b/boost/interprocess/sync/sharable_lock.hpp
@@ -16,7 +16,11 @@
#ifndef BOOST_INTERPROCESS_SHARABLE_LOCK_HPP
#define BOOST_INTERPROCESS_SHARABLE_LOCK_HPP
-#if defined(_MSC_VER)
+#ifndef BOOST_CONFIG_HPP
+# include <boost/config.hpp>
+#endif
+#
+#if defined(BOOST_HAS_PRAGMA_ONCE)
# pragma once
#endif
@@ -27,6 +31,7 @@
#include <boost/interprocess/exceptions.hpp>
#include <boost/interprocess/detail/mpl.hpp>
#include <boost/interprocess/detail/type_traits.hpp>
+#include <boost/interprocess/detail/simple_swap.hpp>
#include <boost/move/utility_core.hpp>
#include <boost/interprocess/detail/posix_time_types_wrk.hpp>
@@ -286,8 +291,8 @@ class sharable_lock
//!Throws: Nothing.
void swap(sharable_lock<mutex_type> &other)
{
- std::swap(mp_mutex, other.mp_mutex);
- std::swap(m_locked, other.m_locked);
+ (simple_swap)(mp_mutex, other.mp_mutex);
+ (simple_swap)(m_locked, other.m_locked);
}
#if !defined(BOOST_INTERPROCESS_DOXYGEN_INVOKED)
diff --git a/boost/interprocess/sync/shm/named_condition.hpp b/boost/interprocess/sync/shm/named_condition.hpp
index e2ff280b7b..e58f5ded7b 100644
--- a/boost/interprocess/sync/shm/named_condition.hpp
+++ b/boost/interprocess/sync/shm/named_condition.hpp
@@ -11,7 +11,11 @@
#ifndef BOOST_INTERPROCESS_SHM_NAMED_CONDITION_HPP
#define BOOST_INTERPROCESS_SHM_NAMED_CONDITION_HPP
-#if defined(_MSC_VER)
+#ifndef BOOST_CONFIG_HPP
+# include <boost/config.hpp>
+#endif
+#
+#if defined(BOOST_HAS_PRAGMA_ONCE)
# pragma once
#endif
diff --git a/boost/interprocess/sync/shm/named_condition_any.hpp b/boost/interprocess/sync/shm/named_condition_any.hpp
index 46bca92e45..6eb06b48ef 100644
--- a/boost/interprocess/sync/shm/named_condition_any.hpp
+++ b/boost/interprocess/sync/shm/named_condition_any.hpp
@@ -11,7 +11,11 @@
#ifndef BOOST_INTERPROCESS_SHM_NAMED_CONDITION_ANY_HPP
#define BOOST_INTERPROCESS_SHM_NAMED_CONDITION_ANY_HPP
-#if defined(_MSC_VER)
+#ifndef BOOST_CONFIG_HPP
+# include <boost/config.hpp>
+#endif
+#
+#if defined(BOOST_HAS_PRAGMA_ONCE)
# pragma once
#endif
diff --git a/boost/interprocess/sync/shm/named_creation_functor.hpp b/boost/interprocess/sync/shm/named_creation_functor.hpp
index 234e072aac..b4cc7786cb 100644
--- a/boost/interprocess/sync/shm/named_creation_functor.hpp
+++ b/boost/interprocess/sync/shm/named_creation_functor.hpp
@@ -11,13 +11,18 @@
#ifndef BOOST_INTERPROCESS_SYNC_NAMED_CREATION_FUNCTOR_HPP
#define BOOST_INTERPROCESS_SYNC_NAMED_CREATION_FUNCTOR_HPP
-#if defined(_MSC_VER)
+#ifndef BOOST_CONFIG_HPP
+# include <boost/config.hpp>
+#endif
+#
+#if defined(BOOST_HAS_PRAGMA_ONCE)
# pragma once
#endif
#include <boost/interprocess/creation_tags.hpp>
#include <boost/interprocess/detail/type_traits.hpp>
#include <boost/interprocess/detail/mpl.hpp>
+#include <boost/container/detail/placement_new.hpp>
namespace boost {
namespace interprocess {
@@ -35,11 +40,11 @@ class named_creation_functor
template<class ArgType>
void construct(void *address, typename enable_if_c<is_same<ArgType, no_arg_t>::value>::type * = 0) const
- { new(address)T; }
+ { ::new(address, boost_container_new_t())T; }
template<class ArgType>
void construct(void *address, typename enable_if_c<!is_same<ArgType, no_arg_t>::value>::type * = 0) const
- { new(address)T(m_arg); }
+ { ::new(address, boost_container_new_t())T(m_arg); }
bool operator()(void *address, std::size_t, bool created) const
{
diff --git a/boost/interprocess/sync/shm/named_mutex.hpp b/boost/interprocess/sync/shm/named_mutex.hpp
index fc66f3a704..846727463f 100644
--- a/boost/interprocess/sync/shm/named_mutex.hpp
+++ b/boost/interprocess/sync/shm/named_mutex.hpp
@@ -11,7 +11,11 @@
#ifndef BOOST_INTERPROCESS_SHM_NAMED_MUTEX_HPP
#define BOOST_INTERPROCESS_SHM_NAMED_MUTEX_HPP
-#if defined(_MSC_VER)
+#ifndef BOOST_CONFIG_HPP
+# include <boost/config.hpp>
+#endif
+#
+#if defined(BOOST_HAS_PRAGMA_ONCE)
# pragma once
#endif
diff --git a/boost/interprocess/sync/shm/named_recursive_mutex.hpp b/boost/interprocess/sync/shm/named_recursive_mutex.hpp
index 988ef66315..345eedaf55 100644
--- a/boost/interprocess/sync/shm/named_recursive_mutex.hpp
+++ b/boost/interprocess/sync/shm/named_recursive_mutex.hpp
@@ -11,7 +11,11 @@
#ifndef BOOST_INTERPROCESS_SHM_NAMED_RECURSIVE_MUTEX_HPP
#define BOOST_INTERPROCESS_SHM_NAMED_RECURSIVE_MUTEX_HPP
-#if defined(_MSC_VER)
+#ifndef BOOST_CONFIG_HPP
+# include <boost/config.hpp>
+#endif
+#
+#if defined(BOOST_HAS_PRAGMA_ONCE)
# pragma once
#endif
diff --git a/boost/interprocess/sync/shm/named_semaphore.hpp b/boost/interprocess/sync/shm/named_semaphore.hpp
index d952d12e14..4ac93e08fd 100644
--- a/boost/interprocess/sync/shm/named_semaphore.hpp
+++ b/boost/interprocess/sync/shm/named_semaphore.hpp
@@ -11,7 +11,11 @@
#ifndef BOOST_INTERPROCESS_SHM_NAMED_SEMAPHORE_HPP
#define BOOST_INTERPROCESS_SHM_NAMED_SEMAPHORE_HPP
-#if defined(_MSC_VER)
+#ifndef BOOST_CONFIG_HPP
+# include <boost/config.hpp>
+#endif
+#
+#if defined(BOOST_HAS_PRAGMA_ONCE)
# pragma once
#endif
diff --git a/boost/interprocess/sync/shm/named_upgradable_mutex.hpp b/boost/interprocess/sync/shm/named_upgradable_mutex.hpp
index 4c397927fb..ced2243bed 100644
--- a/boost/interprocess/sync/shm/named_upgradable_mutex.hpp
+++ b/boost/interprocess/sync/shm/named_upgradable_mutex.hpp
@@ -11,7 +11,11 @@
#ifndef BOOST_INTERPROCESS_NAMED_UPGRADABLE_MUTEX_HPP
#define BOOST_INTERPROCESS_NAMED_UPGRADABLE_MUTEX_HPP
-#if defined(_MSC_VER)
+#ifndef BOOST_CONFIG_HPP
+# include <boost/config.hpp>
+#endif
+#
+#if defined(BOOST_HAS_PRAGMA_ONCE)
# pragma once
#endif
diff --git a/boost/interprocess/sync/spin/condition.hpp b/boost/interprocess/sync/spin/condition.hpp
index e587c32c9b..1a1878b8ac 100644
--- a/boost/interprocess/sync/spin/condition.hpp
+++ b/boost/interprocess/sync/spin/condition.hpp
@@ -11,7 +11,11 @@
#ifndef BOOST_INTERPROCESS_DETAIL_SPIN_CONDITION_HPP
#define BOOST_INTERPROCESS_DETAIL_SPIN_CONDITION_HPP
-#if defined(_MSC_VER)
+#ifndef BOOST_CONFIG_HPP
+# include <boost/config.hpp>
+#endif
+#
+#if defined(BOOST_HAS_PRAGMA_ONCE)
# pragma once
#endif
diff --git a/boost/interprocess/sync/spin/interprocess_barrier.hpp b/boost/interprocess/sync/spin/interprocess_barrier.hpp
index 5f88dd4faa..7a9580df2a 100644
--- a/boost/interprocess/sync/spin/interprocess_barrier.hpp
+++ b/boost/interprocess/sync/spin/interprocess_barrier.hpp
@@ -12,7 +12,11 @@
#include <boost/interprocess/detail/posix_time_types_wrk.hpp>
#include <boost/interprocess/sync/scoped_lock.hpp>
-#if defined(_MSC_VER)
+#ifndef BOOST_CONFIG_HPP
+# include <boost/config.hpp>
+#endif
+#
+#if defined(BOOST_HAS_PRAGMA_ONCE)
# pragma once
#endif
diff --git a/boost/interprocess/sync/spin/mutex.hpp b/boost/interprocess/sync/spin/mutex.hpp
index 154dc6d916..7663673433 100644
--- a/boost/interprocess/sync/spin/mutex.hpp
+++ b/boost/interprocess/sync/spin/mutex.hpp
@@ -11,7 +11,11 @@
#ifndef BOOST_INTERPROCESS_DETAIL_SPIN_MUTEX_HPP
#define BOOST_INTERPROCESS_DETAIL_SPIN_MUTEX_HPP
-#if defined(_MSC_VER)
+#ifndef BOOST_CONFIG_HPP
+# include <boost/config.hpp>
+#endif
+#
+#if defined(BOOST_HAS_PRAGMA_ONCE)
# pragma once
#endif
diff --git a/boost/interprocess/sync/spin/recursive_mutex.hpp b/boost/interprocess/sync/spin/recursive_mutex.hpp
index ce6b0d18ac..495efd900e 100644
--- a/boost/interprocess/sync/spin/recursive_mutex.hpp
+++ b/boost/interprocess/sync/spin/recursive_mutex.hpp
@@ -27,7 +27,11 @@
#ifndef BOOST_INTERPROCESS_DETAIL_SPIN_RECURSIVE_MUTEX_HPP
#define BOOST_INTERPROCESS_DETAIL_SPIN_RECURSIVE_MUTEX_HPP
-#if defined(_MSC_VER)
+#ifndef BOOST_CONFIG_HPP
+# include <boost/config.hpp>
+#endif
+#
+#if defined(BOOST_HAS_PRAGMA_ONCE)
# pragma once
#endif
diff --git a/boost/interprocess/sync/spin/semaphore.hpp b/boost/interprocess/sync/spin/semaphore.hpp
index 94922afe43..ad86c4d05f 100644
--- a/boost/interprocess/sync/spin/semaphore.hpp
+++ b/boost/interprocess/sync/spin/semaphore.hpp
@@ -11,7 +11,11 @@
#ifndef BOOST_INTERPROCESS_DETAIL_SPIN_SEMAPHORE_HPP
#define BOOST_INTERPROCESS_DETAIL_SPIN_SEMAPHORE_HPP
-#if defined(_MSC_VER)
+#ifndef BOOST_CONFIG_HPP
+# include <boost/config.hpp>
+#endif
+#
+#if defined(BOOST_HAS_PRAGMA_ONCE)
# pragma once
#endif
diff --git a/boost/interprocess/sync/spin/wait.hpp b/boost/interprocess/sync/spin/wait.hpp
index 220699bae1..984f91ad00 100644
--- a/boost/interprocess/sync/spin/wait.hpp
+++ b/boost/interprocess/sync/spin/wait.hpp
@@ -15,7 +15,11 @@
#ifndef BOOST_INTERPROCESS_SYNC_WAIT_HPP_INCLUDED
#define BOOST_INTERPROCESS_SYNC_WAIT_HPP_INCLUDED
-#if defined(_MSC_VER)
+#ifndef BOOST_CONFIG_HPP
+# include <boost/config.hpp>
+#endif
+#
+#if defined(BOOST_HAS_PRAGMA_ONCE)
# pragma once
#endif
diff --git a/boost/interprocess/sync/upgradable_lock.hpp b/boost/interprocess/sync/upgradable_lock.hpp
index 646019b433..d067751670 100644
--- a/boost/interprocess/sync/upgradable_lock.hpp
+++ b/boost/interprocess/sync/upgradable_lock.hpp
@@ -16,7 +16,11 @@
#ifndef BOOST_INTERPROCESS_UPGRADABLE_LOCK_HPP
#define BOOST_INTERPROCESS_UPGRADABLE_LOCK_HPP
-#if defined(_MSC_VER)
+#ifndef BOOST_CONFIG_HPP
+# include <boost/config.hpp>
+#endif
+#
+#if defined(BOOST_HAS_PRAGMA_ONCE)
# pragma once
#endif
@@ -290,8 +294,8 @@ class upgradable_lock
//!Throws: Nothing.
void swap(upgradable_lock<mutex_type> &other)
{
- std::swap(mp_mutex, other.mp_mutex);
- std::swap(m_locked, other.m_locked);
+ (simple_swap)(mp_mutex, other.mp_mutex);
+ (simple_swap)(m_locked, other.m_locked);
}
#if !defined(BOOST_INTERPROCESS_DOXYGEN_INVOKED)
diff --git a/boost/interprocess/sync/windows/condition.hpp b/boost/interprocess/sync/windows/condition.hpp
index d5b77c7efe..58a43e25a5 100644
--- a/boost/interprocess/sync/windows/condition.hpp
+++ b/boost/interprocess/sync/windows/condition.hpp
@@ -11,7 +11,11 @@
#ifndef BOOST_INTERPROCESS_DETAIL_WINDOWS_CONDITION_HPP
#define BOOST_INTERPROCESS_DETAIL_WINDOWS_CONDITION_HPP
-#if defined(_MSC_VER)
+#ifndef BOOST_CONFIG_HPP
+# include <boost/config.hpp>
+#endif
+#
+#if defined(BOOST_HAS_PRAGMA_ONCE)
# pragma once
#endif
diff --git a/boost/interprocess/sync/windows/mutex.hpp b/boost/interprocess/sync/windows/mutex.hpp
index 0b1958cfb7..4747d0cc66 100644
--- a/boost/interprocess/sync/windows/mutex.hpp
+++ b/boost/interprocess/sync/windows/mutex.hpp
@@ -11,7 +11,11 @@
#ifndef BOOST_INTERPROCESS_DETAIL_WINDOWS_MUTEX_HPP
#define BOOST_INTERPROCESS_DETAIL_WINDOWS_MUTEX_HPP
-#if defined(_MSC_VER)
+#ifndef BOOST_CONFIG_HPP
+# include <boost/config.hpp>
+#endif
+#
+#if defined(BOOST_HAS_PRAGMA_ONCE)
# pragma once
#endif
diff --git a/boost/interprocess/sync/windows/named_condition.hpp b/boost/interprocess/sync/windows/named_condition.hpp
index ba220fdc5b..9f148a3fb1 100644
--- a/boost/interprocess/sync/windows/named_condition.hpp
+++ b/boost/interprocess/sync/windows/named_condition.hpp
@@ -11,7 +11,11 @@
#ifndef BOOST_INTERPROCESS_WINDOWS_NAMED_CONDITION_HPP
#define BOOST_INTERPROCESS_WINDOWS_NAMED_CONDITION_HPP
-#if defined(_MSC_VER)
+#ifndef BOOST_CONFIG_HPP
+# include <boost/config.hpp>
+#endif
+#
+#if defined(BOOST_HAS_PRAGMA_ONCE)
# pragma once
#endif
diff --git a/boost/interprocess/sync/windows/named_condition_any.hpp b/boost/interprocess/sync/windows/named_condition_any.hpp
index fc2a7fce61..5dac8b77a7 100644
--- a/boost/interprocess/sync/windows/named_condition_any.hpp
+++ b/boost/interprocess/sync/windows/named_condition_any.hpp
@@ -11,7 +11,11 @@
#ifndef BOOST_INTERPROCESS_WINDOWS_NAMED_CONDITION_ANY_HPP
#define BOOST_INTERPROCESS_WINDOWS_NAMED_CONDITION_ANY_HPP
-#if defined(_MSC_VER)
+#ifndef BOOST_CONFIG_HPP
+# include <boost/config.hpp>
+#endif
+#
+#if defined(BOOST_HAS_PRAGMA_ONCE)
# pragma once
#endif
diff --git a/boost/interprocess/sync/windows/named_mutex.hpp b/boost/interprocess/sync/windows/named_mutex.hpp
index 9d5738562b..64a83c94f8 100644
--- a/boost/interprocess/sync/windows/named_mutex.hpp
+++ b/boost/interprocess/sync/windows/named_mutex.hpp
@@ -10,7 +10,11 @@
#ifndef BOOST_INTERPROCESS_WINDOWS_NAMED_MUTEX_HPP
#define BOOST_INTERPROCESS_WINDOWS_NAMED_MUTEX_HPP
-#if defined(_MSC_VER)
+#ifndef BOOST_CONFIG_HPP
+# include <boost/config.hpp>
+#endif
+#
+#if defined(BOOST_HAS_PRAGMA_ONCE)
# pragma once
#endif
diff --git a/boost/interprocess/sync/windows/named_recursive_mutex.hpp b/boost/interprocess/sync/windows/named_recursive_mutex.hpp
index 695c44a5a9..2e591371aa 100644
--- a/boost/interprocess/sync/windows/named_recursive_mutex.hpp
+++ b/boost/interprocess/sync/windows/named_recursive_mutex.hpp
@@ -10,7 +10,11 @@
#ifndef BOOST_INTERPROCESS_WINDOWS_RECURSIVE_NAMED_MUTEX_HPP
#define BOOST_INTERPROCESS_WINDOWS_RECURSIVE_NAMED_MUTEX_HPP
-#if defined(_MSC_VER)
+#ifndef BOOST_CONFIG_HPP
+# include <boost/config.hpp>
+#endif
+#
+#if defined(BOOST_HAS_PRAGMA_ONCE)
# pragma once
#endif
diff --git a/boost/interprocess/sync/windows/named_semaphore.hpp b/boost/interprocess/sync/windows/named_semaphore.hpp
index 7adf91b751..e777a66895 100644
--- a/boost/interprocess/sync/windows/named_semaphore.hpp
+++ b/boost/interprocess/sync/windows/named_semaphore.hpp
@@ -11,7 +11,11 @@
#ifndef BOOST_INTERPROCESS_WINDOWS_NAMED_SEMAPHORE_HPP
#define BOOST_INTERPROCESS_WINDOWS_NAMED_SEMAPHORE_HPP
-#if defined(_MSC_VER)
+#ifndef BOOST_CONFIG_HPP
+# include <boost/config.hpp>
+#endif
+#
+#if defined(BOOST_HAS_PRAGMA_ONCE)
# pragma once
#endif
diff --git a/boost/interprocess/sync/windows/named_sync.hpp b/boost/interprocess/sync/windows/named_sync.hpp
index 5af7a3221a..cf19335a34 100644
--- a/boost/interprocess/sync/windows/named_sync.hpp
+++ b/boost/interprocess/sync/windows/named_sync.hpp
@@ -11,7 +11,11 @@
#ifndef BOOST_INTERPROCESS_WINDOWS_NAMED_SYNC_HPP
#define BOOST_INTERPROCESS_WINDOWS_NAMED_SYNC_HPP
-#if defined(_MSC_VER)
+#ifndef BOOST_CONFIG_HPP
+# include <boost/config.hpp>
+#endif
+#
+#if defined(BOOST_HAS_PRAGMA_ONCE)
# pragma once
#endif
diff --git a/boost/interprocess/sync/windows/recursive_mutex.hpp b/boost/interprocess/sync/windows/recursive_mutex.hpp
index 55a838583b..bf406f8fec 100644
--- a/boost/interprocess/sync/windows/recursive_mutex.hpp
+++ b/boost/interprocess/sync/windows/recursive_mutex.hpp
@@ -11,7 +11,11 @@
#ifndef BOOST_INTERPROCESS_DETAIL_WINDOWS_RECURSIVE_MUTEX_HPP
#define BOOST_INTERPROCESS_DETAIL_WINDOWS_RECURSIVE_MUTEX_HPP
-#if defined(_MSC_VER)
+#ifndef BOOST_CONFIG_HPP
+# include <boost/config.hpp>
+#endif
+#
+#if defined(BOOST_HAS_PRAGMA_ONCE)
# pragma once
#endif
diff --git a/boost/interprocess/sync/windows/semaphore.hpp b/boost/interprocess/sync/windows/semaphore.hpp
index 7fdbc41b3d..7a29d962e5 100644
--- a/boost/interprocess/sync/windows/semaphore.hpp
+++ b/boost/interprocess/sync/windows/semaphore.hpp
@@ -11,7 +11,11 @@
#ifndef BOOST_INTERPROCESS_DETAIL_WINDOWS_SEMAPHORE_HPP
#define BOOST_INTERPROCESS_DETAIL_WINDOWS_SEMAPHORE_HPP
-#if defined(_MSC_VER)
+#ifndef BOOST_CONFIG_HPP
+# include <boost/config.hpp>
+#endif
+#
+#if defined(BOOST_HAS_PRAGMA_ONCE)
# pragma once
#endif
diff --git a/boost/interprocess/sync/windows/sync_utils.hpp b/boost/interprocess/sync/windows/sync_utils.hpp
index 7e54cc36b2..8e054660ca 100644
--- a/boost/interprocess/sync/windows/sync_utils.hpp
+++ b/boost/interprocess/sync/windows/sync_utils.hpp
@@ -11,7 +11,11 @@
#ifndef BOOST_INTERPROCESS_DETAIL_SYNC_UTILS_HPP
#define BOOST_INTERPROCESS_DETAIL_SYNC_UTILS_HPP
-#if defined(_MSC_VER)
+#ifndef BOOST_CONFIG_HPP
+# include <boost/config.hpp>
+#endif
+#
+#if defined(BOOST_HAS_PRAGMA_ONCE)
# pragma once
#endif
diff --git a/boost/interprocess/sync/windows/winapi_mutex_wrapper.hpp b/boost/interprocess/sync/windows/winapi_mutex_wrapper.hpp
index f7b78a9260..983e33571d 100644
--- a/boost/interprocess/sync/windows/winapi_mutex_wrapper.hpp
+++ b/boost/interprocess/sync/windows/winapi_mutex_wrapper.hpp
@@ -11,7 +11,11 @@
#ifndef BOOST_INTERPROCESS_DETAIL_WINAPI_MUTEX_WRAPPER_HPP
#define BOOST_INTERPROCESS_DETAIL_WINAPI_MUTEX_WRAPPER_HPP
-#if defined(_MSC_VER)
+#ifndef BOOST_CONFIG_HPP
+# include <boost/config.hpp>
+#endif
+#
+#if defined(BOOST_HAS_PRAGMA_ONCE)
# pragma once
#endif
diff --git a/boost/interprocess/sync/windows/winapi_semaphore_wrapper.hpp b/boost/interprocess/sync/windows/winapi_semaphore_wrapper.hpp
index f64d506d4d..c98224f15d 100644
--- a/boost/interprocess/sync/windows/winapi_semaphore_wrapper.hpp
+++ b/boost/interprocess/sync/windows/winapi_semaphore_wrapper.hpp
@@ -11,7 +11,11 @@
#ifndef BOOST_INTERPROCESS_DETAIL_WINAPI_SEMAPHORE_WRAPPER_HPP
#define BOOST_INTERPROCESS_DETAIL_WINAPI_SEMAPHORE_WRAPPER_HPP
-#if defined(_MSC_VER)
+#ifndef BOOST_CONFIG_HPP
+# include <boost/config.hpp>
+#endif
+#
+#if defined(BOOST_HAS_PRAGMA_ONCE)
# pragma once
#endif
diff --git a/boost/interprocess/sync/windows/winapi_wrapper_common.hpp b/boost/interprocess/sync/windows/winapi_wrapper_common.hpp
index ccf2d65cb6..428a26eb66 100644
--- a/boost/interprocess/sync/windows/winapi_wrapper_common.hpp
+++ b/boost/interprocess/sync/windows/winapi_wrapper_common.hpp
@@ -11,7 +11,11 @@
#ifndef BOOST_INTERPROCESS_DETAIL_WINAPI_WRAPPER_COMMON_HPP
#define BOOST_INTERPROCESS_DETAIL_WINAPI_WRAPPER_COMMON_HPP
-#if defined(_MSC_VER)
+#ifndef BOOST_CONFIG_HPP
+# include <boost/config.hpp>
+#endif
+#
+#if defined(BOOST_HAS_PRAGMA_ONCE)
# pragma once
#endif
diff --git a/boost/interprocess/sync/xsi/advanced_xsi_semaphore.hpp b/boost/interprocess/sync/xsi/advanced_xsi_semaphore.hpp
index b69cfbf934..49562f5cbd 100644
--- a/boost/interprocess/sync/xsi/advanced_xsi_semaphore.hpp
+++ b/boost/interprocess/sync/xsi/advanced_xsi_semaphore.hpp
@@ -30,7 +30,11 @@
#ifndef BOOST_INTERPROCESS_SYNC_XSI_ADVANCED_XSI_SEMAPHORE_HPP
#define BOOST_INTERPROCESS_SYNC_XSI_ADVANCED_XSI_SEMAPHORE_HPP
-#if defined(_MSC_VER)
+#ifndef BOOST_CONFIG_HPP
+# include <boost/config.hpp>
+#endif
+#
+#if defined(BOOST_HAS_PRAGMA_ONCE)
# pragma once
#endif
diff --git a/boost/interprocess/sync/xsi/simple_xsi_semaphore.hpp b/boost/interprocess/sync/xsi/simple_xsi_semaphore.hpp
index 69ad34caf2..3d6fd882c6 100644
--- a/boost/interprocess/sync/xsi/simple_xsi_semaphore.hpp
+++ b/boost/interprocess/sync/xsi/simple_xsi_semaphore.hpp
@@ -10,7 +10,11 @@
#ifndef BOOST_INTERPROCESS_SYNC_XSI_SIMPLE_XSI_SEMAPHORE_HPP
#define BOOST_INTERPROCESS_SYNC_XSI_SIMPLE_XSI_SEMAPHORE_HPP
-#if defined(_MSC_VER)
+#ifndef BOOST_CONFIG_HPP
+# include <boost/config.hpp>
+#endif
+#
+#if defined(BOOST_HAS_PRAGMA_ONCE)
# pragma once
#endif
diff --git a/boost/interprocess/sync/xsi/xsi_named_mutex.hpp b/boost/interprocess/sync/xsi/xsi_named_mutex.hpp
index 1c4ee78a4f..7d8cf50a83 100644
--- a/boost/interprocess/sync/xsi/xsi_named_mutex.hpp
+++ b/boost/interprocess/sync/xsi/xsi_named_mutex.hpp
@@ -11,7 +11,11 @@
#ifndef BOOST_INTERPROCESS_XSI_XSI_NAMED_MUTEX_HPP
#define BOOST_INTERPROCESS_XSI_XSI_NAMED_MUTEX_HPP
-#if defined(_MSC_VER)
+#ifndef BOOST_CONFIG_HPP
+# include <boost/config.hpp>
+#endif
+#
+#if defined(BOOST_HAS_PRAGMA_ONCE)
# pragma once
#endif
@@ -30,11 +34,13 @@
#include <boost/interprocess/interprocess_fwd.hpp>
#include <boost/interprocess/exceptions.hpp>
#include <boost/interprocess/sync/xsi/basic_xsi_semaphore.hpp>
+#include <boost/interprocess/detail/simple_swap.hpp>
+
#include <cstddef>
#include <boost/assert.hpp>
#include <boost/cstdint.hpp>
#include <string>
-#include <boost/assert.hpp>
+
//!\file
//!Describes a class representing a xsi-based named_mutex.
@@ -142,10 +148,10 @@ inline const char *xsi_named_mutex::get_path() const
inline void xsi_named_mutex::swap(xsi_named_mutex &other)
{
- std::swap(m_key, other.m_key);
- std::swap(m_id, other.m_id);
- std::swap(m_semid, other.m_semid);
- std::swap(m_perm, other.m_perm);
+ (simple_swap)(m_key, other.m_key);
+ (simple_swap)(m_id, other.m_id);
+ (simple_swap)(m_semid, other.m_semid);
+ (simple_swap)(m_perm, other.m_perm);
m_path.swap(other.m_path);
}