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.hpp18
-rw-r--r--boost/interprocess/sync/posix/mutex.hpp6
-rw-r--r--boost/interprocess/sync/posix/pthread_helpers.hpp22
-rw-r--r--boost/interprocess/sync/posix/recursive_mutex.hpp4
-rw-r--r--boost/interprocess/sync/posix/semaphore_wrapper.hpp8
5 files changed, 29 insertions, 29 deletions
diff --git a/boost/interprocess/sync/posix/condition.hpp b/boost/interprocess/sync/posix/condition.hpp
index 213e4ce8b5..48be099f60 100644
--- a/boost/interprocess/sync/posix/condition.hpp
+++ b/boost/interprocess/sync/posix/condition.hpp
@@ -19,7 +19,7 @@
#include <boost/interprocess/detail/workaround.hpp>
#include <pthread.h>
-#include <errno.h>
+#include <errno.h>
#include <boost/interprocess/sync/posix/pthread_helpers.hpp>
#include <boost/interprocess/sync/posix/ptime_to_timespec.hpp>
#include <boost/interprocess/detail/posix_time_types_wrk.hpp>
@@ -44,7 +44,7 @@ class posix_condition
//!liberating system resources.
~posix_condition();
- //!If there is a thread waiting on *this, change that
+ //!If there is a thread waiting on *this, change that
//!thread's state to ready. Otherwise there is no effect.
void notify_one();
@@ -52,8 +52,8 @@ class posix_condition
//!If there are no waiting threads, notify_all() has no effect.
void notify_all();
- //!Releases the lock on the posix_mutex object associated with lock, blocks
- //!the current thread of execution until readied by a call to
+ //!Releases the lock on the posix_mutex object associated with lock, blocks
+ //!the current thread of execution until readied by a call to
//!this->notify_one() or this->notify_all(), and then reacquires the lock.
template <typename L>
void wait(L& lock)
@@ -75,9 +75,9 @@ class posix_condition
this->do_wait(*lock.mutex());
}
- //!Releases the lock on the posix_mutex object associated with lock, blocks
- //!the current thread of execution until readied by a call to
- //!this->notify_one() or this->notify_all(), or until time abs_time is reached,
+ //!Releases the lock on the posix_mutex object associated with lock, blocks
+ //!the current thread of execution until readied by a call to
+ //!this->notify_one() or this->notify_all(), or until time abs_time is reached,
//!and then reacquires the lock.
//!Returns: false if time abs_time is reached, otherwise true.
template <typename L>
@@ -92,8 +92,8 @@ class posix_condition
return this->do_timed_wait(abs_time, *lock.mutex());
}
- //!The same as: while (!pred()) {
- //! if (!timed_wait(lock, abs_time)) return pred();
+ //!The same as: while (!pred()) {
+ //! if (!timed_wait(lock, abs_time)) return pred();
//! } return true;
template <typename L, typename Pr>
bool timed_wait(L& lock, const boost::posix_time::ptime &abs_time, Pr pred)
diff --git a/boost/interprocess/sync/posix/mutex.hpp b/boost/interprocess/sync/posix/mutex.hpp
index 22e2ec04b9..393807c97a 100644
--- a/boost/interprocess/sync/posix/mutex.hpp
+++ b/boost/interprocess/sync/posix/mutex.hpp
@@ -35,7 +35,7 @@
#include <boost/interprocess/detail/workaround.hpp>
#include <pthread.h>
-#include <errno.h>
+#include <errno.h>
#include <boost/interprocess/exceptions.hpp>
#include <boost/interprocess/sync/posix/ptime_to_timespec.hpp>
#include <boost/interprocess/detail/posix_time_types_wrk.hpp>
@@ -80,7 +80,7 @@ inline posix_mutex::posix_mutex()
mut.release();
}
-inline posix_mutex::~posix_mutex()
+inline posix_mutex::~posix_mutex()
{
int res = pthread_mutex_destroy(&m_mut);
BOOST_ASSERT(res == 0);(void)res;
@@ -88,7 +88,7 @@ inline posix_mutex::~posix_mutex()
inline void posix_mutex::lock()
{
- if (pthread_mutex_lock(&m_mut) != 0)
+ if (pthread_mutex_lock(&m_mut) != 0)
throw lock_exception();
}
diff --git a/boost/interprocess/sync/posix/pthread_helpers.hpp b/boost/interprocess/sync/posix/pthread_helpers.hpp
index c09ce200cf..bcbc44be33 100644
--- a/boost/interprocess/sync/posix/pthread_helpers.hpp
+++ b/boost/interprocess/sync/posix/pthread_helpers.hpp
@@ -19,8 +19,8 @@
#include <boost/interprocess/detail/workaround.hpp>
#include <pthread.h>
-#include <errno.h>
-#include <boost/interprocess/exceptions.hpp>
+#include <errno.h>
+#include <boost/interprocess/exceptions.hpp>
namespace boost {
namespace interprocess {
@@ -29,7 +29,7 @@ namespace ipcdetail{
#if defined BOOST_INTERPROCESS_POSIX_PROCESS_SHARED
//!Makes pthread_mutexattr_t cleanup easy when using exceptions
- struct mutexattr_wrapper
+ struct mutexattr_wrapper
{
//!Constructor
mutexattr_wrapper(bool recursive = false)
@@ -51,7 +51,7 @@ namespace ipcdetail{
};
//!Makes pthread_condattr_t cleanup easy when using exceptions
- struct condattr_wrapper
+ struct condattr_wrapper
{
//!Constructor
condattr_wrapper()
@@ -86,7 +86,7 @@ namespace ipcdetail{
void release() {mp_mut = 0; }
- private:
+ private:
pthread_mutex_t *mp_mut;
};
@@ -94,7 +94,7 @@ namespace ipcdetail{
class condition_initializer
{
public:
- condition_initializer(pthread_cond_t &cond, pthread_condattr_t &cond_attr)
+ condition_initializer(pthread_cond_t &cond, pthread_condattr_t &cond_attr)
: mp_cond(&cond)
{
if(pthread_cond_init(mp_cond, &cond_attr)!= 0)
@@ -105,7 +105,7 @@ namespace ipcdetail{
void release() { mp_cond = 0; }
- private:
+ private:
pthread_cond_t *mp_cond;
};
@@ -114,7 +114,7 @@ namespace ipcdetail{
#if defined(BOOST_INTERPROCESS_POSIX_BARRIERS) && defined(BOOST_INTERPROCESS_POSIX_PROCESS_SHARED)
//!Makes pthread_barrierattr_t cleanup easy when using exceptions
- struct barrierattr_wrapper
+ struct barrierattr_wrapper
{
//!Constructor
barrierattr_wrapper()
@@ -138,8 +138,8 @@ namespace ipcdetail{
{
public:
//!Constructor. Takes barrier attributes to initialize the barrier
- barrier_initializer(pthread_barrier_t &mut,
- pthread_barrierattr_t &mut_attr,
+ barrier_initializer(pthread_barrier_t &mut,
+ pthread_barrierattr_t &mut_attr,
int count)
: mp_barrier(&mut)
{
@@ -151,7 +151,7 @@ namespace ipcdetail{
void release() {mp_barrier = 0; }
- private:
+ private:
pthread_barrier_t *mp_barrier;
};
diff --git a/boost/interprocess/sync/posix/recursive_mutex.hpp b/boost/interprocess/sync/posix/recursive_mutex.hpp
index baa670fa9a..456c9a4874 100644
--- a/boost/interprocess/sync/posix/recursive_mutex.hpp
+++ b/boost/interprocess/sync/posix/recursive_mutex.hpp
@@ -31,7 +31,7 @@
#include <boost/interprocess/detail/workaround.hpp>
#include <pthread.h>
-#include <errno.h>
+#include <errno.h>
#include <boost/interprocess/sync/posix/pthread_helpers.hpp>
#include <boost/interprocess/sync/posix/ptime_to_timespec.hpp>
#include <boost/interprocess/detail/posix_time_types_wrk.hpp>
@@ -78,7 +78,7 @@ inline posix_recursive_mutex::~posix_recursive_mutex()
inline void posix_recursive_mutex::lock()
{
- if (pthread_mutex_lock(&m_mut) != 0)
+ if (pthread_mutex_lock(&m_mut) != 0)
throw lock_exception();
}
diff --git a/boost/interprocess/sync/posix/semaphore_wrapper.hpp b/boost/interprocess/sync/posix/semaphore_wrapper.hpp
index 1aeef47662..22184cda9d 100644
--- a/boost/interprocess/sync/posix/semaphore_wrapper.hpp
+++ b/boost/interprocess/sync/posix/semaphore_wrapper.hpp
@@ -18,7 +18,7 @@
#include <boost/interprocess/detail/tmp_dir_helpers.hpp>
#include <boost/interprocess/permissions.hpp>
-#include <fcntl.h> //O_CREAT, O_*...
+#include <fcntl.h> //O_CREAT, O_*...
#include <unistd.h> //close
#include <string> //std::string
#include <semaphore.h> //sem_* family, SEM_VALUE_MAX
@@ -42,7 +42,7 @@ namespace interprocess {
namespace ipcdetail {
inline bool semaphore_open
- (sem_t *&handle, create_enum_t type, const char *origname,
+ (sem_t *&handle, create_enum_t type, const char *origname,
unsigned int count = 0, const permissions &perm = permissions())
{
std::string name;
@@ -103,7 +103,7 @@ inline bool semaphore_open
inline void semaphore_close(sem_t *handle)
{
int ret = sem_close(handle);
- if(ret != 0){
+ if(ret != 0){
BOOST_ASSERT(0);
}
}
@@ -138,7 +138,7 @@ inline void semaphore_init(sem_t *handle, unsigned int initialCount)
inline void semaphore_destroy(sem_t *handle)
{
int ret = sem_destroy(handle);
- if(ret != 0){
+ if(ret != 0){
BOOST_ASSERT(0);
}
}