merging interprocess from develop

This commit is contained in:
Ion Gaztañaga
2020-06-03 00:09:18 +02:00
88 changed files with 159 additions and 425 deletions

View File

@@ -177,6 +177,7 @@ class basic_managed_memory_impl
//throw if constructor allocates memory. So we must catch it.
BOOST_TRY{
//Let's construct the allocator in memory
BOOST_ASSERT((0 == (std::size_t)addr % boost::move_detail::alignment_of<segment_manager>::value));
mp_header = ::new(addr, boost_container_new_t()) segment_manager(size);
}
BOOST_CATCH(...){

View File

@@ -24,9 +24,9 @@
#include <boost/interprocess/errors.hpp>
#include <boost/interprocess/permissions.hpp>
#include <string>
#include <limits>
#include <climits>
#include <limits>
#include <string>
#include <boost/move/detail/type_traits.hpp> //make_unsigned
#if defined (BOOST_INTERPROCESS_WINDOWS)
@@ -37,9 +37,9 @@
# include <unistd.h>
# include <sys/types.h>
# include <sys/stat.h>
# include <errno.h>
# include <cstdio>
# include <dirent.h>
# include <cerrno>
# include <cstdio>
# if 0
# include <sys/file.h>
# endif
@@ -457,7 +457,7 @@ inline file_handle_t create_or_open_file
int ret = -1;
//We need a loop to change permissions correctly using fchmod, since
//with "O_CREAT only" ::open we don't know if we've created or opened the file.
while(1){
while(true){
ret = ::open(name, ((int)mode) | O_EXCL | O_CREAT, perm.get_permissions());
if(ret >= 0){
::fchmod(ret, perm.get_permissions());

View File

@@ -34,14 +34,13 @@
#include <boost/interprocess/detail/config_begin.hpp>
#include <boost/interprocess/detail/workaround.hpp>
#include <stdarg.h>
#include <string>
#if defined (BOOST_INTERPROCESS_WINDOWS)
# include <boost/interprocess/detail/win32_api.hpp>
#else
# ifdef BOOST_HAS_UNISTD_H
# include <errno.h> //Errors
# include <cerrno> //Errors
# include <cstring> //strerror
# else //ifdef BOOST_HAS_UNISTD_H
# error Unknown platform

View File

@@ -60,9 +60,9 @@ class BOOST_SYMBOL_VISIBLE interprocess_exception : public std::exception
catch(...){}
}
virtual ~interprocess_exception() BOOST_NOEXCEPT_OR_NOTHROW {}
~interprocess_exception() BOOST_NOEXCEPT_OR_NOTHROW BOOST_OVERRIDE {}
virtual const char * what() const BOOST_NOEXCEPT_OR_NOTHROW
const char * what() const BOOST_NOEXCEPT_OR_NOTHROW BOOST_OVERRIDE
{ return m_str.c_str(); }
native_error_t get_native_error()const { return m_err.get_native_error(); }
@@ -86,7 +86,7 @@ class BOOST_SYMBOL_VISIBLE lock_exception : public interprocess_exception
: interprocess_exception(lock_error)
{}
virtual const char* what() const BOOST_NOEXCEPT_OR_NOTHROW
const char* what() const BOOST_NOEXCEPT_OR_NOTHROW BOOST_OVERRIDE
{ return "boost::interprocess::lock_exception"; }
};
@@ -96,9 +96,10 @@ class BOOST_SYMBOL_VISIBLE lock_exception : public interprocess_exception
class BOOST_SYMBOL_VISIBLE bad_alloc : public interprocess_exception
{
public:
bad_alloc() : interprocess_exception("::boost::interprocess::bad_alloc"){}
virtual const char* what() const BOOST_NOEXCEPT_OR_NOTHROW
{ return "boost::interprocess::bad_alloc"; }
bad_alloc() : interprocess_exception("::boost::interprocess::bad_alloc") {}
const char* what() const BOOST_NOEXCEPT_OR_NOTHROW BOOST_OVERRIDE
{ return "boost::interprocess::bad_alloc"; }
};
} // namespace interprocess {

View File

@@ -709,7 +709,7 @@ inline bool message_queue_t<VoidPointer>::timed_send
(const void *buffer, size_type buffer_size
,unsigned int priority, const boost::posix_time::ptime &abs_time)
{
if(abs_time == boost::posix_time::pos_infin){
if(abs_time.is_pos_infinity()){
this->send(buffer, buffer_size, priority);
return true;
}
@@ -834,7 +834,7 @@ inline bool
size_type &recvd_size, unsigned int &priority,
const boost::posix_time::ptime &abs_time)
{
if(abs_time == boost::posix_time::pos_infin){
if(abs_time.is_pos_infinity()){
this->receive(buffer, buffer_size, recvd_size, priority);
return true;
}

View File

@@ -424,6 +424,13 @@ class segment_manager
const void *const segm_addr = static_cast<segment_manager_base_t*>(this);
(void)this_addr; (void)segm_addr;
BOOST_ASSERT( this_addr == segm_addr);
const std::size_t void_ptr_alignment = boost::move_detail::alignment_of<void_pointer>::value; (void)void_ptr_alignment;
BOOST_ASSERT((0 == (std::size_t)this_addr % void_ptr_alignment));
BOOST_ASSERT((0 == (std::size_t)segm_addr % void_ptr_alignment));
BOOST_ASSERT((0 == (std::size_t)&m_header % void_ptr_alignment));
BOOST_STATIC_ASSERT((boost::move_detail::alignment_of<segment_manager>::value >= void_ptr_alignment));
BOOST_STATIC_ASSERT((boost::move_detail::alignment_of<segment_manager_base_t>::value >= void_ptr_alignment));
BOOST_STATIC_ASSERT((boost::move_detail::alignment_of<header_t>::value >= void_ptr_alignment));
}
//!Tries to find a previous named/unique allocation. Returns the address

View File

@@ -328,7 +328,7 @@ inline bool shared_memory_object::priv_open_or_create
{
//We need a create/open loop to change permissions correctly using fchmod, since
//with "O_CREAT" only we don't know if we've created or opened the shm.
while(1){
while(true){
//Try to create shared memory
m_handle = shm_open(m_filename.c_str(), oflag | (O_CREAT | O_EXCL), unix_perm);
//If successful change real permissions

View File

@@ -32,7 +32,7 @@ template<class MutexType>
bool try_based_timed_lock(MutexType &m, const boost::posix_time::ptime &abs_time)
{
//Same as lock()
if(abs_time == boost::posix_time::pos_infin){
if(abs_time.is_pos_infinity()){
m.lock();
return true;
}
@@ -73,46 +73,21 @@ void try_based_lock(MutexType &m)
}
template<class MutexType>
void timed_based_lock(MutexType &m, unsigned const uCheckPeriodSec)
void timeout_when_locking_aware_lock(MutexType &m)
{
const boost::posix_time::time_duration dur(0, 0, uCheckPeriodSec);
boost::posix_time::ptime deadline(microsec_clock::universal_time()+dur);
if(!m.timed_lock(deadline)){
spin_wait swait;
do{
deadline = microsec_clock::universal_time()+dur;
if(m.timed_lock(deadline)){
break;
}
else{
swait.yield();
}
#ifdef BOOST_INTERPROCESS_ENABLE_TIMEOUT_WHEN_LOCKING
boost::posix_time::ptime wait_time
= microsec_clock::universal_time()
+ boost::posix_time::milliseconds(BOOST_INTERPROCESS_TIMEOUT_WHEN_LOCKING_DURATION_MS);
if (!m.timed_lock(wait_time))
{
throw interprocess_exception(timeout_when_locking_error
, "Interprocess mutex timeout when locking. Possible deadlock: "
"owner died without unlocking?");
}
while(1);
}
}
template<class MutexType>
void timed_based_timed_lock(MutexType &m, const boost::posix_time::ptime &abs_time, unsigned const uCheckPeriodSec)
{
const boost::posix_time::time_duration dur(0, 0, uCheckPeriodSec);
boost::posix_time::ptime deadline(microsec_clock::universal_time()+dur);
if(abs_time <= deadline){
m.timed_lock(abs_time);
}
else if(!m.timed_lock(deadline)){
spin_wait swait;
do{
deadline = microsec_clock::universal_time()+dur;
if(m.timed_lock(deadline)){
break;
}
else{
swait.yield();
}
}
while(1);
}
#else
m.lock();
#endif
}
} //namespace ipcdetail

View File

@@ -21,6 +21,7 @@
#include <boost/interprocess/detail/config_begin.hpp>
#include <boost/interprocess/detail/workaround.hpp>
#include <boost/interprocess/detail/posix_time_types_wrk.hpp>
namespace boost {
namespace interprocess {
@@ -35,18 +36,18 @@ class internal_mutex_lock
typedef typename Lock::mutex_type::internal_mutex_type mutex_type;
internal_mutex_lock(Lock &l)
BOOST_INTERPROCESS_FORCEINLINE internal_mutex_lock(Lock &l)
: l_(l)
{}
mutex_type* mutex() const
BOOST_INTERPROCESS_FORCEINLINE mutex_type* mutex() const
{ return l_ ? &l_.mutex()->internal_mutex() : 0; }
void lock() { l_.lock(); }
BOOST_INTERPROCESS_FORCEINLINE void lock() { l_.lock(); }
void unlock() { l_.unlock(); }
BOOST_INTERPROCESS_FORCEINLINE void unlock() { l_.unlock(); }
operator unspecified_bool_type() const
BOOST_INTERPROCESS_FORCEINLINE operator unspecified_bool_type() const
{ return l_ ? &internal_mutex_lock::lock : 0; }
private:
@@ -58,11 +59,13 @@ class lock_inverter
{
Lock &l_;
public:
lock_inverter(Lock &l)
BOOST_INTERPROCESS_FORCEINLINE lock_inverter(Lock &l)
: l_(l)
{}
void lock() { l_.unlock(); }
void unlock() { l_.lock(); }
BOOST_INTERPROCESS_FORCEINLINE void lock() { l_.unlock(); }
BOOST_INTERPROCESS_FORCEINLINE void unlock() { l_.lock(); }
};
template <class Lock>
@@ -71,12 +74,15 @@ class lock_to_sharable
Lock &l_;
public:
explicit lock_to_sharable(Lock &l)
BOOST_INTERPROCESS_FORCEINLINE explicit lock_to_sharable(Lock &l)
: l_(l)
{}
void lock() { l_.lock_sharable(); }
bool try_lock(){ return l_.try_lock_sharable(); }
void unlock() { l_.unlock_sharable(); }
BOOST_INTERPROCESS_FORCEINLINE void lock() { l_.lock_sharable(); }
BOOST_INTERPROCESS_FORCEINLINE bool try_lock(){ return l_.try_lock_sharable(); }
BOOST_INTERPROCESS_FORCEINLINE void unlock() { l_.unlock_sharable(); }
};
template <class Lock>
@@ -85,11 +91,15 @@ class lock_to_wait
Lock &l_;
public:
explicit lock_to_wait(Lock &l)
BOOST_INTERPROCESS_FORCEINLINE explicit lock_to_wait(Lock &l)
: l_(l)
{}
void lock() { l_.wait(); }
bool try_lock(){ return l_.try_wait(); }
BOOST_INTERPROCESS_FORCEINLINE void lock() { l_.wait(); }
BOOST_INTERPROCESS_FORCEINLINE bool try_lock() { return l_.try_wait(); }
BOOST_INTERPROCESS_FORCEINLINE bool timed_lock(const boost::posix_time::ptime &abs_time)
{ return l_.timed_wait(abs_time); }
};
} //namespace ipcdetail

View File

@@ -30,6 +30,8 @@
#include <boost/interprocess/detail/workaround.hpp>
#include <boost/interprocess/detail/posix_time_types_wrk.hpp>
#include <boost/assert.hpp>
#include <boost/interprocess/sync/detail/common_algorithms.hpp>
#if !defined(BOOST_INTERPROCESS_FORCE_GENERIC_EMULATION) && defined (BOOST_INTERPROCESS_POSIX_PROCESS_SHARED)
#include <boost/interprocess/sync/posix/mutex.hpp>
@@ -155,21 +157,7 @@ inline interprocess_mutex::interprocess_mutex(){}
inline interprocess_mutex::~interprocess_mutex(){}
inline void interprocess_mutex::lock()
{
#ifdef BOOST_INTERPROCESS_ENABLE_TIMEOUT_WHEN_LOCKING
boost::posix_time::ptime wait_time
= microsec_clock::universal_time()
+ boost::posix_time::milliseconds(BOOST_INTERPROCESS_TIMEOUT_WHEN_LOCKING_DURATION_MS);
if (!m_mutex.timed_lock(wait_time))
{
throw interprocess_exception(timeout_when_locking_error
, "Interprocess mutex timeout when locking. Possible deadlock: "
"owner died without unlocking?");
}
#else
m_mutex.lock();
#endif
}
{ ipcdetail::timeout_when_locking_aware_lock(m_mutex); }
inline bool interprocess_mutex::try_lock()
{ return m_mutex.try_lock(); }

View File

@@ -40,6 +40,7 @@
#include <boost/interprocess/detail/config_begin.hpp>
#include <boost/interprocess/detail/workaround.hpp>
#include <boost/interprocess/detail/posix_time_types_wrk.hpp>
#include <boost/interprocess/sync/detail/common_algorithms.hpp>
#include <boost/assert.hpp>
#if !defined(BOOST_INTERPROCESS_FORCE_GENERIC_EMULATION) && \
@@ -151,18 +152,7 @@ inline interprocess_recursive_mutex::interprocess_recursive_mutex(){}
inline interprocess_recursive_mutex::~interprocess_recursive_mutex(){}
inline void interprocess_recursive_mutex::lock()
{
#ifdef BOOST_INTERPROCESS_ENABLE_TIMEOUT_WHEN_LOCKING
boost::posix_time::ptime wait_time
= microsec_clock::universal_time()
+ boost::posix_time::milliseconds(BOOST_INTERPROCESS_TIMEOUT_WHEN_LOCKING_DURATION_MS);
if (!mutex.timed_lock(wait_time)){
throw interprocess_exception(timeout_when_locking_error, "Interprocess mutex timeout when locking. Possible deadlock: owner died without unlocking?");
}
#else
mutex.lock();
#endif
}
{ ipcdetail::timeout_when_locking_aware_lock(mutex); }
inline bool interprocess_recursive_mutex::try_lock()
{ return mutex.try_lock(); }

View File

@@ -27,6 +27,8 @@
#include <boost/interprocess/creation_tags.hpp>
#include <boost/interprocess/exceptions.hpp>
#include <boost/interprocess/detail/posix_time_types_wrk.hpp>
#include <boost/interprocess/sync/detail/locks.hpp>
#include <boost/interprocess/sync/detail/common_algorithms.hpp>
#if !defined(BOOST_INTERPROCESS_FORCE_GENERIC_EMULATION) && \
(defined(BOOST_INTERPROCESS_POSIX_PROCESS_SHARED) && defined(BOOST_INTERPROCESS_POSIX_UNNAMED_SEMAPHORES))
@@ -95,14 +97,15 @@ class interprocess_semaphore
private:
#if defined(BOOST_INTERPROCESS_USE_GENERIC_EMULATION)
#undef BOOST_INTERPROCESS_USE_GENERIC_EMULATION
ipcdetail::spin_semaphore m_sem;
typedef ipcdetail::spin_semaphore internal_sem_t;
#elif defined(BOOST_INTERPROCESS_USE_WINDOWS)
#undef BOOST_INTERPROCESS_USE_WINDOWS
ipcdetail::windows_semaphore m_sem;
typedef ipcdetail::windows_semaphore internal_sem_t;
#else
#undef BOOST_INTERPROCESS_USE_POSIX
ipcdetail::posix_semaphore m_sem;
typedef ipcdetail::posix_semaphore internal_sem_t;
#endif //#if defined(BOOST_INTERPROCESS_USE_GENERIC_EMULATION)
internal_sem_t m_sem;
#endif //#ifndef BOOST_INTERPROCESS_DOXYGEN_INVOKED
};
@@ -120,18 +123,10 @@ inline interprocess_semaphore::~interprocess_semaphore(){}
inline void interprocess_semaphore::wait()
{
#ifdef BOOST_INTERPROCESS_ENABLE_TIMEOUT_WHEN_LOCKING
boost::posix_time::ptime wait_time
= microsec_clock::universal_time()
+ boost::posix_time::milliseconds(BOOST_INTERPROCESS_TIMEOUT_WHEN_LOCKING_DURATION_MS);
if (!m_sem.timed_wait(wait_time))
{
throw interprocess_exception(timeout_when_waiting_error, "Interprocess semaphore timeout when waiting. Possible deadlock: owner died without posting?");
}
#else
m_sem.wait();
#endif
ipcdetail::lock_to_wait<internal_sem_t> ltw(m_sem);
timeout_when_locking_aware_lock(ltw);
}
inline bool interprocess_semaphore::try_wait()
{ return m_sem.try_wait(); }

View File

@@ -90,7 +90,7 @@ class posix_condition
if (!lock)
throw lock_exception();
//Posix does not support infinity absolute time so handle it here
if(abs_time == boost::posix_time::pos_infin){
if(abs_time.is_pos_infinity()){
this->wait(lock);
return true;
}
@@ -106,7 +106,7 @@ class posix_condition
if (!lock)
throw lock_exception();
//Posix does not support infinity absolute time so handle it here
if(abs_time == boost::posix_time::pos_infin){
if(abs_time.is_pos_infinity()){
this->wait(lock, pred);
return true;
}

View File

@@ -109,7 +109,7 @@ inline bool posix_mutex::timed_lock(const boost::posix_time::ptime &abs_time)
{
#ifdef BOOST_INTERPROCESS_POSIX_TIMEOUTS
//Posix does not support infinity absolute time so handle it here
if(abs_time == boost::posix_time::pos_infin){
if(abs_time.is_pos_infinity()){
this->lock();
return true;
}

View File

@@ -103,7 +103,7 @@ inline bool posix_recursive_mutex::timed_lock(const boost::posix_time::ptime &ab
{
#ifdef BOOST_INTERPROCESS_POSIX_TIMEOUTS
//Posix does not support infinity absolute time so handle it here
if(abs_time == boost::posix_time::pos_infin){
if(abs_time.is_pos_infinity()){
this->lock();
return true;
}

View File

@@ -216,7 +216,7 @@ inline bool semaphore_timed_wait(sem_t *handle, const boost::posix_time::ptime &
{
#ifdef BOOST_INTERPROCESS_POSIX_TIMEOUTS
//Posix does not support infinity absolute time so handle it here
if(abs_time == boost::posix_time::pos_infin){
if(abs_time.is_pos_infinity()){
semaphore_wait(handle);
return true;
}

View File

@@ -52,7 +52,7 @@ class spin_condition
if (!lock)
throw lock_exception();
//Handle infinity absolute time here to avoid complications in do_timed_wait
if(abs_time == boost::posix_time::pos_infin){
if(abs_time.is_pos_infinity()){
this->wait(lock);
return true;
}
@@ -65,7 +65,7 @@ class spin_condition
if (!lock)
throw lock_exception();
//Handle infinity absolute time here to avoid complications in do_timed_wait
if(abs_time == boost::posix_time::pos_infin){
if(abs_time.is_pos_infinity()){
this->wait(lock, pred);
return true;
}

View File

@@ -48,6 +48,23 @@ class spin_mutex
void take_ownership(){}
private:
volatile boost::uint32_t m_s;
struct common_lock_wrapper
{
common_lock_wrapper(spin_mutex &sp)
: m_sp(sp)
{}
void lock()
{
ipcdetail::try_based_lock(m_sp);
}
bool timed_lock(const boost::posix_time::ptime &abs_time)
{ return m_sp.timed_lock(abs_time); }
spin_mutex &m_sp;
};
};
inline spin_mutex::spin_mutex()
@@ -65,19 +82,8 @@ inline spin_mutex::~spin_mutex()
inline void spin_mutex::lock(void)
{
#ifdef BOOST_INTERPROCESS_ENABLE_TIMEOUT_WHEN_LOCKING
boost::posix_time::ptime wait_time
= microsec_clock::universal_time()
+ boost::posix_time::milliseconds(BOOST_INTERPROCESS_TIMEOUT_WHEN_LOCKING_DURATION_MS);
if (!timed_lock(wait_time))
{
throw interprocess_exception(timeout_when_locking_error
, "Interprocess mutex timeout when locking. Possible deadlock: "
"owner died without unlocking?");
}
#else
return ipcdetail::try_based_lock(*this);
#endif
common_lock_wrapper clw(*this);
ipcdetail::timeout_when_locking_aware_lock(clw);
}
inline bool spin_mutex::try_lock(void)

View File

@@ -31,32 +31,9 @@ namespace boost {
namespace interprocess {
namespace ipcdetail {
inline bool winapi_wrapper_timed_wait_for_single_object(void *handle, const boost::posix_time::ptime &abs_time);
inline void winapi_wrapper_wait_for_single_object(void *handle)
inline bool do_winapi_wait(void *handle, unsigned long dwMilliseconds)
{
winapi_wrapper_timed_wait_for_single_object(handle, boost::posix_time::pos_infin);
}
inline bool winapi_wrapper_try_wait_for_single_object(void *handle)
{
return winapi_wrapper_timed_wait_for_single_object(handle, boost::posix_time::min_date_time);
}
inline bool winapi_wrapper_timed_wait_for_single_object(void *handle, const boost::posix_time::ptime &abs_time)
{
const boost::posix_time::ptime cur_time = microsec_clock::universal_time();
//Windows uses relative wait times so check for negative waits
//and implement as 0 wait to allow try-semantics as POSIX mandates.
unsigned long time = 0u;
if (abs_time == boost::posix_time::pos_infin){
time = winapi::infinite_time;
}
else if(abs_time > cur_time){
time = (abs_time - cur_time).total_milliseconds();
}
unsigned long ret = winapi::wait_for_single_object(handle, time);
unsigned long ret = winapi::wait_for_single_object(handle, dwMilliseconds);
if(ret == winapi::wait_object_0){
return true;
}
@@ -73,6 +50,33 @@ inline bool winapi_wrapper_timed_wait_for_single_object(void *handle, const boos
}
}
inline bool winapi_wrapper_timed_wait_for_single_object(void *handle, const boost::posix_time::ptime &abs_time)
{
//Windows uses relative wait times so check for negative waits
//and implement as 0 wait to allow try-semantics as POSIX mandates.
unsigned long time = 0u;
if (abs_time.is_pos_infinity()){
time = winapi::infinite_time;
}
else {
const boost::posix_time::ptime cur_time = microsec_clock::universal_time();
if(abs_time > cur_time){
time = (abs_time - cur_time).total_milliseconds();
}
}
return do_winapi_wait(handle, time);
}
inline void winapi_wrapper_wait_for_single_object(void *handle)
{
(void)do_winapi_wait(handle, winapi::infinite_time);
}
inline bool winapi_wrapper_try_wait_for_single_object(void *handle)
{
return do_winapi_wait(handle, 0u);
}
} //namespace ipcdetail {
} //namespace interprocess {
} //namespace boost {

View File

@@ -8,7 +8,6 @@
//
//////////////////////////////////////////////////////////////////////////////
#define BOOST_CONTAINER_ADAPTIVE_NODE_POOL_CHECK_INVARIANTS
#include <boost/interprocess/detail/config_begin.hpp>
#include "node_pool_test.hpp"
#include <boost/interprocess/allocators/detail/adaptive_node_pool.hpp>
#include <vector>
@@ -26,5 +25,3 @@ int main ()
return 0;
}
#include <boost/interprocess/detail/config_end.hpp>

View File

@@ -8,7 +8,6 @@
//
//////////////////////////////////////////////////////////////////////////////
#define BOOST_CONTAINER_ADAPTIVE_NODE_POOL_CHECK_INVARIANTS
#include <boost/interprocess/detail/config_begin.hpp>
#include <boost/interprocess/managed_shared_memory.hpp>
#include <boost/interprocess/containers/list.hpp>
#include <boost/interprocess/containers/vector.hpp>
@@ -67,5 +66,3 @@ int main ()
return 0;
}
#include <boost/interprocess/detail/config_end.hpp>

View File

@@ -8,7 +8,6 @@
//
//////////////////////////////////////////////////////////////////////////////
#include <boost/interprocess/detail/config_begin.hpp>
#include <boost/interprocess/allocators/allocator.hpp>
#include <boost/interprocess/managed_shared_memory.hpp>
#include <boost/interprocess/containers/vector.hpp>
@@ -92,4 +91,3 @@ int main ()
return 0;
}
#include <boost/interprocess/detail/config_end.hpp>

View File

@@ -8,7 +8,6 @@
//
//////////////////////////////////////////////////////////////////////////////
#include <boost/interprocess/detail/config_begin.hpp>
#include <iostream>
#include <boost/interprocess/mapped_region.hpp>
#include <boost/interprocess/anonymous_shared_memory.hpp>
@@ -50,5 +49,3 @@ int main ()
}
return 0;
}
#include <boost/interprocess/detail/config_end.hpp>

View File

@@ -10,7 +10,6 @@
#define _WIN32_WINNT 0x0501
#define BOOST_USE_WINDOWS_H
#include <boost/interprocess/detail/config_begin.hpp>
#include <boost/interprocess/detail/workaround.hpp>
#ifdef BOOST_INTERPROCESS_WINDOWS
@@ -34,5 +33,3 @@ int main()
}
#endif
#include <boost/interprocess/detail/config_end.hpp>

View File

@@ -8,7 +8,6 @@
//
//////////////////////////////////////////////////////////////////////////////
#include <boost/interprocess/detail/config_begin.hpp>
#include <boost/interprocess/streams/bufferstream.hpp>
#include <sstream>
#include <cstring>
@@ -141,4 +140,3 @@ int main ()
return 0;
}
#include <boost/interprocess/detail/config_end.hpp>

View File

@@ -8,7 +8,6 @@
//
//////////////////////////////////////////////////////////////////////////////
#define BOOST_CONTAINER_ADAPTIVE_NODE_POOL_CHECK_INVARIANTS
#include <boost/interprocess/detail/config_begin.hpp>
#include <boost/interprocess/managed_shared_memory.hpp>
#include <boost/interprocess/containers/list.hpp>
#include <boost/interprocess/containers/vector.hpp>
@@ -69,5 +68,3 @@ int main ()
return 0;
}
#include <boost/interprocess/detail/config_end.hpp>

View File

@@ -8,7 +8,6 @@
//
//////////////////////////////////////////////////////////////////////////////
#include <boost/interprocess/detail/config_begin.hpp>
#include <boost/interprocess/managed_shared_memory.hpp>
#include <boost/interprocess/containers/list.hpp>
#include <boost/interprocess/containers/vector.hpp>
@@ -63,5 +62,3 @@ int main ()
return 1;
return 0;
}
#include <boost/interprocess/detail/config_end.hpp>

View File

@@ -8,8 +8,6 @@
//
//////////////////////////////////////////////////////////////////////////////
#include <boost/interprocess/detail/config_begin.hpp>
#include <boost/interprocess/detail/workaround.hpp>
#include <boost/interprocess/sync/interprocess_condition_any.hpp>
#include <boost/interprocess/sync/interprocess_mutex.hpp>
#include <boost/interprocess/sync/interprocess_recursive_mutex.hpp>
@@ -30,5 +28,3 @@ int main ()
return 0;
}
#include <boost/interprocess/detail/config_end.hpp>

View File

@@ -8,7 +8,6 @@
//
//////////////////////////////////////////////////////////////////////////////
#include <boost/interprocess/detail/config_begin.hpp>
#include <boost/interprocess/detail/workaround.hpp>
#include <boost/interprocess/sync/interprocess_condition.hpp>
#include <boost/interprocess/sync/interprocess_mutex.hpp>
@@ -36,5 +35,3 @@ int main ()
return 0;
}
#include <boost/interprocess/detail/config_end.hpp>

View File

@@ -8,7 +8,6 @@
//
//////////////////////////////////////////////////////////////////////////////
#include <boost/interprocess/detail/config_begin.hpp>
#include <boost/interprocess/allocators/allocator.hpp>
#include <boost/interprocess/managed_shared_memory.hpp>
#include <boost/interprocess/containers/vector.hpp>
@@ -93,5 +92,3 @@ int main ()
shared_memory_object::remove(shMemName);
return 0;
}
#include <boost/interprocess/detail/config_end.hpp>

View File

@@ -8,7 +8,6 @@
//
//////////////////////////////////////////////////////////////////////////////
#include <boost/interprocess/detail/config_begin.hpp>
#include <memory>
#include <deque>
#include <iostream>
@@ -308,5 +307,3 @@ int main ()
return 0;
}
#include <boost/interprocess/detail/config_end.hpp>

View File

@@ -10,7 +10,6 @@
// See http://www.boost.org/libs/interprocess for documentation.
//
//////////////////////////////////////////////////////////////////////////////
#include <boost/interprocess/detail/config_begin.hpp>
#include <boost/interprocess/detail/workaround.hpp>
#include <boost/interprocess/smart_ptr/enable_shared_from_this.hpp>
#include <boost/interprocess/smart_ptr/shared_ptr.hpp>
@@ -93,5 +92,3 @@ int main()
shared_memory_object::remove(process_name.c_str());
return boost::report_errors();
}
#include <boost/interprocess/detail/config_end.hpp>

View File

@@ -7,8 +7,6 @@
// See http://www.boost.org/libs/interprocess for documentation.
//
//////////////////////////////////////////////////////////////////////////////
#include <boost/interprocess/detail/config_begin.hpp>
#include <boost/interprocess/detail/workaround.hpp>
#include <boost/interprocess/sync/file_lock.hpp>
#include <boost/interprocess/sync/scoped_lock.hpp>
#include <boost/interprocess/file_mapping.hpp>
@@ -77,4 +75,3 @@ int main ()
return 0;
}
#include <boost/interprocess/detail/config_end.hpp>

View File

@@ -8,7 +8,6 @@
//
//////////////////////////////////////////////////////////////////////////////
#include <boost/interprocess/detail/config_begin.hpp>
#include <ios> //std::streamoff
#include <fstream> //std::ofstream, std::ifstream
#include <iostream>
@@ -160,5 +159,3 @@ int main ()
file_mapping::remove(get_filename().c_str());
return 0;
}
#include <boost/interprocess/detail/config_end.hpp>

View File

@@ -8,7 +8,6 @@
//
//////////////////////////////////////////////////////////////////////////////
#include <boost/interprocess/detail/config_begin.hpp>
#include <boost/interprocess/indexes/flat_map_index.hpp>
#include "named_allocation_test_template.hpp"
@@ -21,5 +20,3 @@ int main ()
return 0;
}
#include <boost/interprocess/detail/config_end.hpp>

View File

@@ -8,7 +8,6 @@
//
//////////////////////////////////////////////////////////////////////////////
#include <boost/interprocess/detail/config_begin.hpp>
#include <set>
#include <boost/interprocess/managed_shared_memory.hpp>
#include <boost/interprocess/containers/flat_set.hpp>
@@ -198,5 +197,3 @@ int main()
return 0;
}
#include <boost/interprocess/detail/config_end.hpp>

View File

@@ -7,7 +7,6 @@
// See http://www.boost.org/libs/interprocess for documentation.
//
//////////////////////////////////////////////////////////////////////////////
#include <boost/interprocess/detail/config_begin.hpp>
#include <boost/interprocess/detail/intermodule_singleton.hpp>
#include <boost/interprocess/detail/portable_intermodule_singleton.hpp>
#include <iostream>
@@ -326,5 +325,3 @@ int main ()
return 0;
}
#include <boost/interprocess/detail/config_end.hpp>

View File

@@ -9,7 +9,6 @@
//
//////////////////////////////////////////////////////////////////////////////
#include <boost/interprocess/detail/config_begin.hpp>
#include <boost/interprocess/offset_ptr.hpp>
#include <boost/interprocess/smart_ptr/intrusive_ptr.hpp>
#include <boost/interprocess/managed_shared_memory.hpp>
@@ -542,5 +541,3 @@ int main()
return boost::report_errors();
}
#include <boost/interprocess/detail/config_end.hpp>

View File

@@ -7,7 +7,6 @@
// See http://www.boost.org/libs/interprocess for documentation.
//
//////////////////////////////////////////////////////////////////////////////
#include <boost/interprocess/detail/config_begin.hpp>
#include <boost/interprocess/indexes/iset_index.hpp>
#include "named_allocation_test_template.hpp"
@@ -20,5 +19,3 @@ int main ()
return 0;
}
#include <boost/interprocess/detail/config_end.hpp>

View File

@@ -8,7 +8,6 @@
//
//////////////////////////////////////////////////////////////////////////////
#include <boost/interprocess/detail/config_begin.hpp>
#include <boost/interprocess/indexes/iunordered_set_index.hpp>
#include "named_allocation_test_template.hpp"
@@ -21,5 +20,3 @@ int main ()
return 0;
}
#include <boost/interprocess/detail/config_end.hpp>

View File

@@ -8,7 +8,6 @@
//
//////////////////////////////////////////////////////////////////////////////
#include <boost/interprocess/detail/config_begin.hpp>
#include <boost/interprocess/managed_shared_memory.hpp>
#include <boost/interprocess/containers/list.hpp>
#include <boost/interprocess/allocators/allocator.hpp>
@@ -59,5 +58,3 @@ int main ()
return 0;
}
#include <boost/interprocess/detail/config_end.hpp>

View File

@@ -8,7 +8,6 @@
//
//////////////////////////////////////////////////////////////////////////////
#include <boost/interprocess/detail/config_begin.hpp>
#include <boost/interprocess/detail/workaround.hpp>
#if defined(BOOST_INTERPROCESS_MAPPED_FILES)
@@ -235,5 +234,3 @@ int main()
}
#endif//#if defined(BOOST_INTERPROCESS_MAPPED_FILES)
#include <boost/interprocess/detail/config_end.hpp>

View File

@@ -8,7 +8,6 @@
//
//////////////////////////////////////////////////////////////////////////////
#include <boost/interprocess/detail/config_begin.hpp>
#include <boost/interprocess/allocators/allocator.hpp>
#include <boost/interprocess/containers/vector.hpp>
#include <boost/interprocess/managed_shared_memory.hpp>
@@ -212,5 +211,3 @@ int main ()
shared_memory_object::remove(ShmemName);
return 0;
}
#include <boost/interprocess/detail/config_end.hpp>

View File

@@ -8,7 +8,6 @@
//
//////////////////////////////////////////////////////////////////////////////
#include <boost/interprocess/detail/config_begin.hpp>
#include <boost/interprocess/detail/workaround.hpp>
#ifdef BOOST_INTERPROCESS_WINDOWS
@@ -148,5 +147,3 @@ int main()
}
#endif
#include <boost/interprocess/detail/config_end.hpp>

View File

@@ -8,12 +8,10 @@
//
//////////////////////////////////////////////////////////////////////////////
#include <boost/interprocess/detail/config_begin.hpp>
#include <boost/interprocess/detail/workaround.hpp>
#if defined(BOOST_INTERPROCESS_XSI_SHARED_MEMORY_OBJECTS)
#include <boost/interprocess/detail/config_begin.hpp>
#include <boost/interprocess/allocators/allocator.hpp>
#include <boost/interprocess/containers/vector.hpp>
#include <boost/interprocess/managed_xsi_shared_memory.hpp>
@@ -170,5 +168,3 @@ int main()
}
#endif //#ifndef BOOST_INTERPROCESS_XSI_SHARED_MEMORY_OBJECTS
#include <boost/interprocess/detail/config_end.hpp>

View File

@@ -8,7 +8,6 @@
//
//////////////////////////////////////////////////////////////////////////////
#define BOOST_CONTAINER_ADAPTIVE_NODE_POOL_CHECK_INVARIANTS
#include <boost/interprocess/detail/config_begin.hpp>
#include <boost/interprocess/indexes/map_index.hpp>
#include "named_allocation_test_template.hpp"
@@ -21,5 +20,3 @@ int main ()
return 0;
}
#include <boost/interprocess/detail/config_end.hpp>

View File

@@ -7,9 +7,10 @@
// See http://www.boost.org/libs/interprocess for documentation.
//
//////////////////////////////////////////////////////////////////////////////
#include <boost/interprocess/detail/workaround.hpp>
#if defined(BOOST_INTERPROCESS_MAPPED_FILES)
#include <boost/interprocess/detail/config_begin.hpp>
#include <boost/interprocess/allocators/allocator.hpp>
#include <boost/interprocess/containers/vector.hpp>
#include <boost/interprocess/detail/file_wrapper.hpp>
@@ -88,8 +89,6 @@ int main ()
return 0;
}
#include <boost/interprocess/detail/config_end.hpp>
#else //#if !defined(BOOST_INTERPROCESS_MAPPED_FILES)
int main()

View File

@@ -8,7 +8,6 @@
//
//////////////////////////////////////////////////////////////////////////////
#include <boost/interprocess/detail/config_begin.hpp>
#include <boost/interprocess/managed_shared_memory.hpp>
#include <boost/interprocess/mem_algo/simple_seq_fit.hpp>
#include <boost/interprocess/mem_algo/rbtree_best_fit.hpp>
@@ -87,5 +86,3 @@ int main ()
shared_memory_object::remove(shMemName);
return 0;
}
#include <boost/interprocess/detail/config_end.hpp>

View File

@@ -8,7 +8,6 @@
//
//////////////////////////////////////////////////////////////////////////////
#include <boost/interprocess/detail/config_begin.hpp>
#include <boost/interprocess/ipc/message_queue.hpp>
#include <boost/interprocess/managed_external_buffer.hpp>
#include <boost/interprocess/managed_heap_memory.hpp>
@@ -373,4 +372,3 @@ int main ()
return 0;
}
#include <boost/interprocess/detail/config_end.hpp>

View File

@@ -8,7 +8,6 @@
//
//////////////////////////////////////////////////////////////////////////////
#include <boost/interprocess/detail/config_begin.hpp>
#include <boost/interprocess/detail/workaround.hpp>
#include <boost/interprocess/sync/interprocess_mutex.hpp>
#include "mutex_test_template.hpp"
@@ -33,5 +32,3 @@ int main ()
test::test_all_mutex<interprocess_mutex>();
return 0;
}
#include <boost/interprocess/detail/config_end.hpp>

View File

@@ -13,9 +13,9 @@
#define BOOST_INTERPROCESS_TIMEOUT_WHEN_LOCKING_DURATION_MS 1000
#include <boost/assert.hpp>
#include <boost/interprocess/detail/config_begin.hpp>
#include <boost/interprocess/sync/interprocess_mutex.hpp>
#include <boost/interprocess/sync/interprocess_recursive_mutex.hpp>
#include <boost/interprocess/sync/spin/mutex.hpp>
#include "mutex_test_template.hpp"
int main ()
@@ -23,8 +23,7 @@ int main ()
using namespace boost::interprocess;
test::test_mutex_lock_timeout<interprocess_mutex>();
test::test_mutex_lock_timeout<interprocess_recursive_mutex>();
test::test_mutex_lock_timeout<ipcdetail::spin_mutex>();
return 0;
}
#include <boost/interprocess/detail/config_end.hpp>

View File

@@ -8,8 +8,6 @@
//
//////////////////////////////////////////////////////////////////////////////
#include <boost/interprocess/detail/config_begin.hpp>
#include <boost/interprocess/detail/workaround.hpp>
#include <boost/interprocess/sync/named_mutex.hpp>
#include <boost/interprocess/sync/named_condition_any.hpp>
#include <boost/interprocess/sync/detail/locks.hpp>
@@ -186,4 +184,3 @@ int main ()
return 0;
}
#include <boost/interprocess/detail/config_end.hpp>

View File

@@ -8,8 +8,6 @@
//
//////////////////////////////////////////////////////////////////////////////
#include <boost/interprocess/detail/config_begin.hpp>
#include <boost/interprocess/detail/workaround.hpp>
#include <boost/interprocess/sync/named_mutex.hpp>
#include <boost/interprocess/sync/named_condition.hpp>
#include <boost/interprocess/sync/detail/locks.hpp>
@@ -185,5 +183,3 @@ int main ()
named_mutex::remove(test::add_to_process_id_name("named_mutex"));
return 0;
}
#include <boost/interprocess/detail/config_end.hpp>

View File

@@ -7,8 +7,6 @@
// See http://www.boost.org/libs/interprocess for documentation.
//
//////////////////////////////////////////////////////////////////////////////
#include <boost/interprocess/detail/config_begin.hpp>
#include <boost/interprocess/detail/workaround.hpp>
#include <boost/interprocess/managed_shared_memory.hpp>
// intrusive/detail
#include <boost/intrusive/detail/minimal_pair_header.hpp>
@@ -193,4 +191,3 @@ int main ()
}
//]
#include <boost/interprocess/detail/config_end.hpp>

View File

@@ -8,7 +8,6 @@
//
//////////////////////////////////////////////////////////////////////////////
#include <boost/interprocess/detail/config_begin.hpp>
#include <boost/interprocess/sync/named_mutex.hpp>
#include <boost/interprocess/sync/scoped_lock.hpp>
#include "mutex_test_template.hpp"
@@ -34,5 +33,3 @@ int main ()
named_mutex::remove(test::get_process_id_name());
return 0;
}
#include <boost/interprocess/detail/config_end.hpp>

View File

@@ -8,7 +8,6 @@
//
//////////////////////////////////////////////////////////////////////////////
#include <boost/interprocess/detail/config_begin.hpp>
#include <boost/interprocess/sync/named_recursive_mutex.hpp>
#include <boost/interprocess/sync/scoped_lock.hpp>
#include <boost/date_time/posix_time/posix_time_types.hpp>
@@ -37,5 +36,3 @@ int main ()
return 0;
}
#include <boost/interprocess/detail/config_end.hpp>

View File

@@ -8,7 +8,6 @@
//
//////////////////////////////////////////////////////////////////////////////
#include <boost/interprocess/detail/config_begin.hpp>
#include <boost/interprocess/sync/named_semaphore.hpp>
#include <boost/interprocess/detail/interprocess_tester.hpp>
#include <boost/interprocess/exceptions.hpp>
@@ -120,4 +119,3 @@ int main ()
return 0;
}
#include <boost/interprocess/detail/config_end.hpp>

View File

@@ -8,7 +8,6 @@
//
//////////////////////////////////////////////////////////////////////////////
#include <boost/interprocess/detail/config_begin.hpp>
#include "mutex_test_template.hpp"
#include "sharable_mutex_test_template.hpp"
#include "named_creation_template.hpp"
@@ -99,5 +98,3 @@ int main ()
named_sharable_mutex::remove(test::get_process_id_name());
return 0;
}
#include <boost/interprocess/detail/config_end.hpp>

View File

@@ -8,7 +8,6 @@
//
//////////////////////////////////////////////////////////////////////////////
#include <boost/interprocess/detail/config_begin.hpp>
#include "mutex_test_template.hpp"
#include "sharable_mutex_test_template.hpp"
#include "named_creation_template.hpp"
@@ -99,5 +98,3 @@ int main ()
named_upgradable_mutex::remove(test::get_process_id_name());
return 0;
}
#include <boost/interprocess/detail/config_end.hpp>

View File

@@ -8,7 +8,6 @@
//
//////////////////////////////////////////////////////////////////////////////
#include <boost/interprocess/detail/config_begin.hpp>
#include <boost/interprocess/managed_shared_memory.hpp>
#include <boost/interprocess/containers/list.hpp>
#include <boost/interprocess/containers/vector.hpp>
@@ -62,5 +61,3 @@ int main ()
return 1;
return 0;
}
#include <boost/interprocess/detail/config_end.hpp>

View File

@@ -7,7 +7,6 @@
// See http://www.boost.org/libs/interprocess for documentation.
//
//////////////////////////////////////////////////////////////////////////////
#include <boost/interprocess/detail/config_begin.hpp>
#include "node_pool_test.hpp"
#include <boost/interprocess/allocators/detail/node_pool.hpp>
@@ -25,5 +24,3 @@ int main ()
return 0;
}
#include <boost/interprocess/detail/config_end.hpp>

View File

@@ -8,7 +8,6 @@
//
//////////////////////////////////////////////////////////////////////////////
#include <boost/interprocess/detail/config_begin.hpp>
#include <boost/interprocess/indexes/null_index.hpp>
#include <boost/interprocess/managed_shared_memory.hpp>
#include <boost/interprocess/mem_algo/simple_seq_fit.hpp>
@@ -47,5 +46,3 @@ int main ()
shared_memory_object::remove(test::get_process_id_name());
return 0;
}
#include <boost/interprocess/detail/config_end.hpp>

View File

@@ -8,7 +8,6 @@
//
//////////////////////////////////////////////////////////////////////////////
#include <boost/interprocess/detail/config_begin.hpp>
#include <boost/interprocess/offset_ptr.hpp>
#include <boost/interprocess/detail/type_traits.hpp>
#include <boost/intrusive/pointer_traits.hpp>
@@ -291,62 +290,3 @@ int main()
test_pointer_plus_bits();
return ::boost::report_errors();
}
#include <boost/interprocess/detail/config_end.hpp>
/*
//Offset ptr benchmark
#include <vector>
#include <iostream>
#include <boost/interprocess/managed_shared_memory.hpp>
#include <boost/interprocess/containers/vector.hpp>
#include <boost/interprocess/allocators/allocator.hpp>
#include <boost/timer.hpp>
#include <cstddef>
template<class InIt,
class Ty> inline
Ty accumulate2(InIt First, InIt Last, Ty Val)
{ // return sum of Val and all in [First, Last)
for (; First != Last; ++First) //First = First + 1)
Val = Val + *First;
return (Val);
}
template <typename Vector>
void time_test(const Vector& vec, std::size_t iterations, const char* label) {
// assert(!vec.empty())
boost::timer t;
typename Vector::const_iterator first = vec.begin();
typename Vector::value_type result(0);
while (iterations != 0) {
result = accumulate2(first, first + vec.size(), result);
--iterations;
}
std::cout << label << t.elapsed() << " " << result << std::endl;
}
int main()
{
using namespace boost::interprocess;
typedef allocator<double, managed_shared_memory::segment_manager> alloc_t;
std::size_t n = 0x1 << 26;
std::size_t file_size = n * sizeof(double) + 1000000;
{
shared_memory_object::remove("MyMappedFile");
managed_shared_memory segment(open_or_create, "MyMappedFile", file_size);
shared_memory_object::remove("MyMappedFile");
alloc_t alloc_inst(segment.get_segment_manager());
vector<double, alloc_t> v0(n, double(42.42), alloc_inst);
time_test(v0, 10, "iterator shared: ");
}
{
std::vector<double> v1(n, double(42.42));
time_test(v1, 10, "iterator non-shared: ");
}
return 0;
}
*/

View File

@@ -8,7 +8,6 @@
//
//////////////////////////////////////////////////////////////////////////////
#include <boost/interprocess/detail/config_begin.hpp>
#include <boost/interprocess/managed_shared_memory.hpp>
#include <boost/interprocess/containers/list.hpp>
#include <boost/interprocess/containers/vector.hpp>
@@ -62,5 +61,3 @@ int main ()
return 1;
return 0;
}
#include <boost/interprocess/detail/config_end.hpp>

View File

@@ -8,7 +8,6 @@
//
//////////////////////////////////////////////////////////////////////////////
#include <boost/interprocess/detail/config_begin.hpp>
#include <boost/interprocess/managed_shared_memory.hpp>
#include <boost/interprocess/containers/list.hpp>
#include <boost/interprocess/containers/vector.hpp>
@@ -62,5 +61,3 @@ int main ()
return 1;
return 0;
}
#include <boost/interprocess/detail/config_end.hpp>

View File

@@ -8,7 +8,6 @@
//
//////////////////////////////////////////////////////////////////////////////
#include <boost/interprocess/detail/config_begin.hpp>
#include <boost/interprocess/detail/workaround.hpp>
#if defined(BOOST_INTERPROCESS_WINDOWS)
#include <boost/interprocess/sync/windows/recursive_mutex.hpp>
@@ -38,5 +37,3 @@ int main ()
return 0;
}
#include <boost/interprocess/detail/config_end.hpp>

View File

@@ -7,7 +7,6 @@
// See http://www.boost.org/libs/interprocess for documentation.
//
//////////////////////////////////////////////////////////////////////////////
#include <boost/interprocess/detail/config_begin.hpp>
#include "robust_mutex_test.hpp"
#include <boost/interprocess/detail/robust_emulation.hpp>
#include <boost/interprocess/sync/spin/mutex.hpp>
@@ -18,5 +17,3 @@ int main(int argc, char *argv[])
return test::robust_mutex_test
< ipcdetail::robust_spin_mutex<ipcdetail::spin_mutex> >(argc, argv);
}
#include <boost/interprocess/detail/config_end.hpp>

View File

@@ -7,7 +7,6 @@
// See http://www.boost.org/libs/interprocess for documentation.
//
//////////////////////////////////////////////////////////////////////////////
#include <boost/interprocess/detail/config_begin.hpp>
#include "robust_mutex_test.hpp"
#include <boost/interprocess/detail/robust_emulation.hpp>
#include <boost/interprocess/sync/spin/recursive_mutex.hpp>
@@ -19,5 +18,3 @@ int main(int argc, char *argv[])
return test::robust_mutex_test
< ipcdetail::robust_spin_mutex<ipcdetail::spin_recursive_mutex> >(argc, argv);
}
#include <boost/interprocess/detail/config_end.hpp>

View File

@@ -1,3 +1,13 @@
//////////////////////////////////////////////////////////////////////////////
//
// (C) Copyright Ion Gaztanaga 2004-2019. Distributed under the Boost
// Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/interprocess for documentation.
//
//////////////////////////////////////////////////////////////////////////////
#include <boost/interprocess/indexes/flat_map_index.hpp>
#include <boost/interprocess/indexes/map_index.hpp>
#include <boost/interprocess/indexes/null_index.hpp>

View File

@@ -8,7 +8,6 @@
//
//////////////////////////////////////////////////////////////////////////////
#include <boost/interprocess/detail/config_begin.hpp>
#include <boost/interprocess/sync/interprocess_semaphore.hpp>
#include <boost/interprocess/exceptions.hpp>
#include <boost/date_time/posix_time/posix_time_types.hpp>
@@ -66,5 +65,3 @@ int main ()
test::test_all_mutex<semaphore_test_wrapper>();
return 0;
}
#include <boost/interprocess/detail/config_end.hpp>

View File

@@ -8,7 +8,6 @@
//
//////////////////////////////////////////////////////////////////////////////
#include <boost/interprocess/detail/config_begin.hpp>
#include "mutex_test_template.hpp"
#include "sharable_mutex_test_template.hpp"
#include <boost/interprocess/sync/interprocess_sharable_mutex.hpp>
@@ -27,5 +26,3 @@ int main ()
return 0;
}
#include <boost/interprocess/detail/config_end.hpp>

View File

@@ -8,7 +8,6 @@
//
//////////////////////////////////////////////////////////////////////////////
#include <boost/interprocess/detail/config_begin.hpp>
#include <fstream>
#include <iostream>
#include <boost/interprocess/shared_memory_object.hpp>

View File

@@ -8,7 +8,6 @@
//
//////////////////////////////////////////////////////////////////////////////
#include <boost/interprocess/detail/config_begin.hpp>
#include <boost/interprocess/shared_memory_object.hpp>
#include <boost/interprocess/detail/managed_open_or_create_impl.hpp>
#include <boost/interprocess/exceptions.hpp>
@@ -83,5 +82,3 @@ int main ()
shared_memory_object::remove(ShmName);
return 0;
}
#include <boost/interprocess/detail/config_end.hpp>

View File

@@ -10,7 +10,6 @@
//
//////////////////////////////////////////////////////////////////////////////
#include <boost/interprocess/detail/config_begin.hpp>
#include <boost/interprocess/offset_ptr.hpp>
#include <boost/interprocess/smart_ptr/shared_ptr.hpp>
#include <boost/interprocess/smart_ptr/weak_ptr.hpp>
@@ -611,5 +610,3 @@ int main()
test_alias();
}
#include <boost/interprocess/detail/config_end.hpp>

View File

@@ -7,7 +7,6 @@
// See http://www.boost.org/libs/interprocess for documentation.
//
//////////////////////////////////////////////////////////////////////////////
#include <boost/interprocess/detail/config_begin.hpp>
#include <boost/interprocess/managed_shared_memory.hpp>
#include <boost/interprocess/containers/slist.hpp>
#include <boost/interprocess/allocators/allocator.hpp>
@@ -59,5 +58,3 @@ int main ()
return 1;
}
#include <boost/interprocess/detail/config_end.hpp>

View File

@@ -8,7 +8,6 @@
//
//////////////////////////////////////////////////////////////////////////////
#include <boost/interprocess/detail/config_begin.hpp>
#include <boost/interprocess/managed_shared_memory.hpp>
#include <boost/interprocess/containers/stable_vector.hpp>
#include <boost/interprocess/allocators/allocator.hpp>
@@ -68,5 +67,3 @@ int main()
return 0;
}
#include <boost/interprocess/detail/config_end.hpp>

View File

@@ -8,7 +8,6 @@
//
//////////////////////////////////////////////////////////////////////////////
#include <boost/interprocess/detail/config_begin.hpp>
#include <boost/interprocess/managed_shared_memory.hpp>
#include <boost/interprocess/allocators/allocator.hpp>
#include <boost/interprocess/containers/vector.hpp>
@@ -286,4 +285,3 @@ int main()
return 0;
}
#include <boost/interprocess/detail/config_end.hpp>

View File

@@ -7,7 +7,6 @@
// See http://www.boost.org/libs/interprocess for documentation.
//
//////////////////////////////////////////////////////////////////////////////
#include <boost/interprocess/detail/config_begin.hpp>
#include <set>
#include <boost/interprocess/managed_shared_memory.hpp>
#include <boost/interprocess/containers/set.hpp>
@@ -195,5 +194,3 @@ int main ()
return 0;
}
#include <boost/interprocess/detail/config_end.hpp>

View File

@@ -8,7 +8,6 @@
//
//////////////////////////////////////////////////////////////////////////////
#include <boost/interprocess/detail/config_begin.hpp>
#include <boost/interprocess/offset_ptr.hpp>
#include <boost/interprocess/smart_ptr/unique_ptr.hpp>
#include <boost/interprocess/managed_shared_memory.hpp>
@@ -138,5 +137,3 @@ int main()
shared_memory_object::remove(process_name.c_str());
return 0;
}
#include <boost/interprocess/detail/config_end.hpp>

View File

@@ -8,7 +8,6 @@
//
//////////////////////////////////////////////////////////////////////////////
#include <boost/interprocess/detail/config_begin.hpp>
#include <boost/interprocess/managed_shared_memory.hpp>
#include <boost/interprocess/allocators/allocator.hpp>
#include "get_process_id_name.hpp"
@@ -96,5 +95,3 @@ int main()
bip::shared_memory_object::remove(bip::test::get_process_id_name());
return 0;
}
#include <boost/interprocess/detail/config_end.hpp>

View File

@@ -8,7 +8,6 @@
//
//////////////////////////////////////////////////////////////////////////////
#include <boost/interprocess/detail/config_begin.hpp>
#include "mutex_test_template.hpp"
#include "sharable_mutex_test_template.hpp"
#include <boost/interprocess/sync/interprocess_upgradable_mutex.hpp>
@@ -169,5 +168,3 @@ int main ()
return 0;
}
#include <boost/interprocess/detail/config_end.hpp>

View File

@@ -8,7 +8,6 @@
//
//////////////////////////////////////////////////////////////////////////////
#include <boost/interprocess/detail/config_begin.hpp>
#include <algorithm>
#include <vector>
#include <list>
@@ -255,5 +254,3 @@ int main ()
return 0;
}
#include <boost/interprocess/detail/config_end.hpp>

View File

@@ -8,7 +8,6 @@
//
//////////////////////////////////////////////////////////////////////////////
#include <boost/interprocess/detail/config_begin.hpp>
#include <boost/interprocess/managed_shared_memory.hpp>
#include <boost/interprocess/containers/vector.hpp>
#include <boost/interprocess/allocators/allocator.hpp>
@@ -99,5 +98,3 @@ int main()
return 0;
}
#include <boost/interprocess/detail/config_end.hpp>

View File

@@ -8,7 +8,6 @@
//
//////////////////////////////////////////////////////////////////////////////
#include <boost/interprocess/detail/config_begin.hpp>
#include <boost/interprocess/containers/string.hpp>
#include <boost/interprocess/containers/vector.hpp>
#include <boost/interprocess/streams/vectorstream.hpp>
@@ -181,5 +180,3 @@ int main ()
}
return 0;
}
#include <boost/interprocess/detail/config_end.hpp>

View File

@@ -8,12 +8,9 @@
//
//////////////////////////////////////////////////////////////////////////////
#include <boost/interprocess/detail/config_begin.hpp>
#include <boost/interprocess/detail/workaround.hpp>
#include <boost/config.hpp>
#ifdef BOOST_INTERPROCESS_WINDOWS
#define BOOST_INTERPROCESS_WINDOWS
#ifdef BOOST_WINDOWS
//Force user-defined get_shared_dir
#define BOOST_INTERPROCESS_SHARED_DIR_FUNC
@@ -51,15 +48,17 @@ int main ()
ipcdetail::get_shared_dir(shared_dir);
std::string shm_path(shared_dir);
shm_path += "/";
shm_path += shm_name;
int ret = 0;
shared_memory_object::remove(shm_name);
{
shared_memory_object shm(create_only, shm_name, read_write);
{
shared_memory_object shm(create_only, shm_name, read_write);
}
shm_path += shm_name;
int ret = ipcdetail::invalid_file() == ipcdetail::open_existing_file(shm_path.c_str(), read_only) ?
ret = ipcdetail::invalid_file() == ipcdetail::open_existing_file(shm_path.c_str(), read_only) ?
1 : 0;
if(ret)
{
@@ -79,6 +78,4 @@ int main()
return 0;
}
#endif //#ifdef BOOST_INTERPROCESS_WINDOWS
#include <boost/interprocess/detail/config_end.hpp>
#endif //#ifdef BOOST_WINDOWS

View File

@@ -8,10 +8,9 @@
//
//////////////////////////////////////////////////////////////////////////////
#include <boost/interprocess/detail/config_begin.hpp>
#include <boost/interprocess/detail/workaround.hpp>
#include <boost/config.hpp>
#ifdef BOOST_INTERPROCESS_WINDOWS
#ifdef BOOST_WINDOWS
#include <fstream>
#include <iostream>
@@ -135,4 +134,3 @@ int main()
#endif
#include <boost/interprocess/detail/config_end.hpp>

View File

@@ -8,10 +8,9 @@
//
//////////////////////////////////////////////////////////////////////////////
#include <boost/interprocess/detail/config_begin.hpp>
#include <boost/interprocess/detail/workaround.hpp>
#include <boost/config.hpp>
#ifdef BOOST_INTERPROCESS_WINDOWS
#ifdef BOOST_WINDOWS
#include <boost/interprocess/windows_shared_memory.hpp>
#include <boost/interprocess/detail/managed_open_or_create_impl.hpp>
@@ -75,6 +74,4 @@ int main()
return 0;
}
#endif //#ifdef BOOST_INTERPROCESS_WINDOWS
#include <boost/interprocess/detail/config_end.hpp>
#endif //#ifdef BOOST_WINDOWS

View File

@@ -8,7 +8,6 @@
//
//////////////////////////////////////////////////////////////////////////////
#include <boost/interprocess/detail/config_begin.hpp>
#include <boost/interprocess/detail/workaround.hpp>
#if defined(BOOST_INTERPROCESS_XSI_SHARED_MEMORY_OBJECTS)
@@ -135,5 +134,3 @@ int main()
}
#endif //BOOST_INTERPROCESS_XSI_SHARED_MEMORY_OBJECTS
#include <boost/interprocess/detail/config_end.hpp>