summaryrefslogtreecommitdiff
path: root/boost/interprocess/sync/posix
diff options
context:
space:
mode:
Diffstat (limited to 'boost/interprocess/sync/posix')
-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
9 files changed, 53 insertions, 9 deletions
diff --git a/boost/interprocess/sync/posix/condition.hpp b/boost/interprocess/sync/posix/condition.hpp
index e09fe4a..5372d96 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 4cd4207..70adc23 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 2b3be2f..28fafa8 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 03510e3..8180da1 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 ce859d7..c615c85 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 65993de..5aa09e0 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 ccb50da..9ef4f12 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 ba6a6f0..6fea766 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 33f55fa..ca0f519 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);