mirror of
https://github.com/boostorg/interprocess.git
synced 2026-01-19 04:12:13 +00:00
Fixes for 1.41
[SVN r56823]
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
# Boost.Interprocess library documentation Jamfile ---------------------------------
|
||||
#
|
||||
# Copyright Ion Gaztanaga 2005-2007. Use, modification and
|
||||
# Copyright Ion Gaztanaga 2005-2009. Use, modification and
|
||||
# distribution is subject to 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)
|
||||
@@ -32,7 +32,7 @@ doxygen autodoc
|
||||
\"BOOST_INTERPROCESS_ENABLE_MOVE_EMULATION(a)= \" \\
|
||||
\"BOOST_INTERPROCESS_RV_REF(a)=a &&\" \\
|
||||
\"BOOST_INTERPROCESS_RV_REF_2_TEMPL_ARGS(a,b,c)=a &&\" \\
|
||||
\"BOOST_INTERPROCESS_RV_REF_3_TEMPL_ARGS(a)=a &&\" \\
|
||||
\"BOOST_INTERPROCESS_RV_REF_3_TEMPL_ARGS(a,b,c,d)=a &&\" \\
|
||||
\"BOOST_INTERPROCESS_FWD_REF(a)=a &&\""
|
||||
<xsl:param>"boost.doxygen.reftitle=Boost.Interprocess Reference"
|
||||
;
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
[/
|
||||
/ Copyright (c) 2007-2008 Ion Gaztanaga
|
||||
/ Copyright (c) 2007-2009 Ion Gaztanaga
|
||||
/
|
||||
/ 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)
|
||||
/]
|
||||
|
||||
[library Boost.Interprocess
|
||||
[quickbook 1.3]
|
||||
[quickbook 1.4]
|
||||
[authors [Gaztanaga, Ion]]
|
||||
[copyright 2005- 2008 Ion Gaztanaga]
|
||||
[id interprocess]
|
||||
@@ -1351,14 +1351,14 @@ Boost.Interprocess offers the following mutex types:
|
||||
|
||||
#include <boost/interprocess/sync/interprocess_mutex.hpp>
|
||||
|
||||
* [classref boost::interprocess::interprocess_mutex]: A non-recursive,
|
||||
* [classref boost::interprocess::interprocess_mutex interprocess_mutex]: A non-recursive,
|
||||
anonymous mutex that can be placed in shared memory or memory mapped files.
|
||||
|
||||
[c++]
|
||||
|
||||
#include <boost/interprocess/sync/interprocess_recursive_mutex.hpp>
|
||||
|
||||
* [classref boost::interprocess::interprocess_recursive_mutex]: A recursive,
|
||||
* [classref boost::interprocess::interprocess_recursive_mutex interprocess_recursive_mutex]: A recursive,
|
||||
anonymous mutex that can be placed in shared memory or memory mapped files.
|
||||
|
||||
[c++]
|
||||
@@ -1518,7 +1518,7 @@ Boost.Interprocess offers the following condition types:
|
||||
|
||||
#include <boost/interprocess/sync/interprocess_condition.hpp>
|
||||
|
||||
* [classref boost::interprocess::interprocess_condition]:
|
||||
* [classref boost::interprocess::interprocess_condition interprocess_condition]:
|
||||
An anonymous condition variable that can be placed in shared memory or memory
|
||||
mapped files to be used with [classref boost::interprocess::interprocess_mutex].
|
||||
|
||||
@@ -1526,8 +1526,8 @@ Boost.Interprocess offers the following condition types:
|
||||
|
||||
#include <boost/interprocess/sync/named_condition.hpp>
|
||||
|
||||
* [classref boost::interprocess::named_condition]: A named
|
||||
condition variable to be used with [classref boost::interprocess::named_mutex].
|
||||
* [classref boost::interprocess::named_condition named_condition]: A named
|
||||
condition variable to be used with [classref boost::interprocess::named_mutex named_mutex].
|
||||
|
||||
Named conditions are similar to anonymous conditions, but they are used in
|
||||
combination with named mutexes. Several times, we don't want to store
|
||||
@@ -1609,7 +1609,7 @@ Boost.Interprocess offers the following semaphore types:
|
||||
|
||||
#include <boost/interprocess/sync/interprocess_semaphore.hpp>
|
||||
|
||||
* [classref boost::interprocess::interprocess_semaphore]:
|
||||
* [classref boost::interprocess::interprocess_semaphore interprocess_semaphore]:
|
||||
An anonymous semaphore that can be placed in shared memory or memory
|
||||
mapped files.
|
||||
|
||||
@@ -1617,13 +1617,9 @@ Boost.Interprocess offers the following semaphore types:
|
||||
|
||||
#include <boost/interprocess/sync/named_semaphore.hpp>
|
||||
|
||||
* [classref boost::interprocess::named_condition]: A named
|
||||
* [classref boost::interprocess::named_semaphore named_semaphore]: A named
|
||||
semaphore.
|
||||
|
||||
Named conditions are similar to anonymous conditions, but they are used in
|
||||
combination with named mutexes. Several times, we don't want to store
|
||||
synchronization objects with the synchronized data:
|
||||
|
||||
[endsect]
|
||||
|
||||
[section:semaphores_anonymous_example Anonymous semaphore example]
|
||||
@@ -1977,7 +1973,7 @@ Boost.Interprocess offers the following upgradable mutex types:
|
||||
|
||||
#include <boost/interprocess/sync/interprocess_upgradable_mutex.hpp>
|
||||
|
||||
* [classref boost::interprocess::interprocess_upgradable_mutex]: A non-recursive,
|
||||
* [classref boost::interprocess::interprocess_upgradable_mutex interprocess_upgradable_mutex]: A non-recursive,
|
||||
anonymous upgradable mutex that can be placed in shared memory or memory mapped files.
|
||||
|
||||
[c++]
|
||||
@@ -1993,12 +1989,12 @@ Boost.Interprocess offers the following upgradable mutex types:
|
||||
|
||||
As with plain mutexes, it's important to release the acquired lock even in the presence
|
||||
of exceptions. [*Boost.Interprocess] mutexes are best used with the
|
||||
[classref boost::interprocess::scoped_lock] utility,
|
||||
[classref boost::interprocess::scoped_lock scoped_lock] utility,
|
||||
and this class only offers exclusive locking.
|
||||
|
||||
As we have sharable locking and upgradable locking with upgradable mutexes, we have two new
|
||||
utilities: [classref boost::interprocess::sharable_lock] and
|
||||
[classref boost::interprocess::upgradable_lock]. Both classes are similar to `scoped_lock`
|
||||
utilities: [classref boost::interprocess::sharable_lock sharable_lock] and
|
||||
[classref boost::interprocess::upgradable_lock upgradable_lock]. Both classes are similar to `scoped_lock`
|
||||
but `sharable_lock` acquires the sharable lock in the constructor and `upgradable_lock`
|
||||
acquires the upgradable lock in the constructor.
|
||||
|
||||
@@ -2855,7 +2851,7 @@ This is the second process:
|
||||
[doc_message_queueB]
|
||||
|
||||
To know more about this class and all its operations, please see the
|
||||
[classref boost::interprocess::message_queue] class reference.
|
||||
[classref boost::interprocess::message_queue message_queue] class reference.
|
||||
|
||||
[endsect]
|
||||
|
||||
@@ -3425,7 +3421,7 @@ parameter (`MemoryAlgorithm`). That is, the mutex type used to synchronize
|
||||
named/unique allocations is defined by the
|
||||
`MemoryAlgorithm::mutex_family::recursive_mutex_type` type. For shared memory,
|
||||
and memory mapped file based managed segments this recursive mutex is defined
|
||||
as [classref boost::interprocess::interprocess_recursive_mutex].
|
||||
as [classref boost::interprocess::interprocess_recursive_mutex interprocess_recursive_mutex].
|
||||
|
||||
If two processes can call:
|
||||
|
||||
@@ -4189,7 +4185,7 @@ To use a managed heap memory, you must include the following header:
|
||||
#include <boost/interprocess/managed_heap_memory.hpp>
|
||||
|
||||
The use is exactly the same as
|
||||
[classref boost::interprocess::basic_managed_external_buffer],
|
||||
[classref boost::interprocess::basic_managed_external_buffer basic_managed_external_buffer],
|
||||
except that memory is created by
|
||||
the managed memory segment itself using dynamic (new/delete) memory.
|
||||
|
||||
@@ -5023,7 +5019,7 @@ objects in the container, avoiding unnecessary copies.
|
||||
|
||||
|
||||
To transfer the contents of a container to another one, use
|
||||
`boost::move()` function, as shown in the example. For more details
|
||||
`boost::interprocess::move()` function, as shown in the example. For more details
|
||||
about functions supporting move-semantics, see the reference section of
|
||||
Boost.Interprocess containers:
|
||||
|
||||
@@ -6534,6 +6530,14 @@ warranty.
|
||||
|
||||
[section:release_notes Release Notes]
|
||||
|
||||
[section:release_notes_boost_1_41_00 Boost 1.41 Release]
|
||||
|
||||
* Support for POSIX shared memory in Mac OS.
|
||||
* [*ABI breaking]: Generic `semaphore` and `named_semaphore` now implemented more efficiently with atomic operations.
|
||||
* More robust file opening in Windows platforms with active Anti-virus software.
|
||||
|
||||
[endsect]
|
||||
|
||||
[section:release_notes_boost_1_40_00 Boost 1.40 Release]
|
||||
|
||||
* Windows shared memory is created in Shared Documents folder so that it can be shared
|
||||
|
||||
@@ -36,6 +36,7 @@ rule test_all
|
||||
: # requirements
|
||||
<toolset>acc:<linkflags>-lrt
|
||||
<toolset>acc-pa_risc:<linkflags>-lrt
|
||||
<host-os>hpux,<toolset>gcc:<linkflags>"-Wl,+as,mpas"
|
||||
] ;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2006-2007. Distributed under the Boost
|
||||
// (C) Copyright Ion Gaztanaga 2006-2009. 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)
|
||||
//
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2006-2007. Distributed under the Boost
|
||||
// (C) Copyright Ion Gaztanaga 2006-2009. 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)
|
||||
//
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2006-2007. Distributed under the Boost
|
||||
// (C) Copyright Ion Gaztanaga 2006-2009. 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)
|
||||
//
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2006-2007. Distributed under the Boost
|
||||
// (C) Copyright Ion Gaztanaga 2006-2009. 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)
|
||||
//
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2006-2007. Distributed under the Boost
|
||||
// (C) Copyright Ion Gaztanaga 2006-2009. 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)
|
||||
//
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2006-2007. Distributed under the Boost
|
||||
// (C) Copyright Ion Gaztanaga 2006-2009. 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)
|
||||
//
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2006-2007. Distributed under the Boost
|
||||
// (C) Copyright Ion Gaztanaga 2006-2009. 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)
|
||||
//
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2006-2007. Distributed under the Boost
|
||||
// (C) Copyright Ion Gaztanaga 2006-2009. 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)
|
||||
//
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2006-2007. Distributed under the Boost
|
||||
// (C) Copyright Ion Gaztanaga 2006-2009. 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)
|
||||
//
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2006-2007. Distributed under the Boost
|
||||
// (C) Copyright Ion Gaztanaga 2006-2009. 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)
|
||||
//
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2006-2007. Distributed under the Boost
|
||||
// (C) Copyright Ion Gaztanaga 2006-2009. 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)
|
||||
//
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2006-2007. Distributed under the Boost
|
||||
// (C) Copyright Ion Gaztanaga 2006-2009. 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)
|
||||
//
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2006-2007. Distributed under the Boost
|
||||
// (C) Copyright Ion Gaztanaga 2006-2009. 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)
|
||||
//
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2006-2007. Distributed under the Boost
|
||||
// (C) Copyright Ion Gaztanaga 2006-2009. 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)
|
||||
//
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2006-2007. Distributed under the Boost
|
||||
// (C) Copyright Ion Gaztanaga 2006-2009. 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)
|
||||
//
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2006-2007. Distributed under the Boost
|
||||
// (C) Copyright Ion Gaztanaga 2006-2009. 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)
|
||||
//
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2006-2007. Distributed under the Boost
|
||||
// (C) Copyright Ion Gaztanaga 2006-2009. 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)
|
||||
//
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2006-2007. Distributed under the Boost
|
||||
// (C) Copyright Ion Gaztanaga 2006-2009. 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)
|
||||
//
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2006-2007. Distributed under the Boost
|
||||
// (C) Copyright Ion Gaztanaga 2006-2009. 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)
|
||||
//
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2006-2008. Distributed under the Boost
|
||||
// (C) Copyright Ion Gaztanaga 2006-2009. 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)
|
||||
//
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2006-2007. Distributed under the Boost
|
||||
// (C) Copyright Ion Gaztanaga 2006-2009. 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)
|
||||
//
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2006-2007. Distributed under the Boost
|
||||
// (C) Copyright Ion Gaztanaga 2006-2009. 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)
|
||||
//
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2006-2007. Distributed under the Boost
|
||||
// (C) Copyright Ion Gaztanaga 2006-2009. 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)
|
||||
//
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2006-2007. Distributed under the Boost
|
||||
// (C) Copyright Ion Gaztanaga 2006-2009. 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)
|
||||
//
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2006-2007. Distributed under the Boost
|
||||
// (C) Copyright Ion Gaztanaga 2006-2009. 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)
|
||||
//
|
||||
@@ -85,4 +85,31 @@ int main()
|
||||
return 0;
|
||||
}
|
||||
//]
|
||||
/*
|
||||
|
||||
#include <vector>
|
||||
#include <boost/interprocess/managed_windows_shared_memory.hpp>
|
||||
|
||||
int main()
|
||||
{
|
||||
using namespace boost::interprocess;
|
||||
typedef boost::interprocess::
|
||||
managed_windows_shared_memory shared_segment;
|
||||
|
||||
std::vector<void *> ptrs;
|
||||
shared_segment m_segment(create_only, "shmem", 4096*16);
|
||||
try{
|
||||
while(1){
|
||||
//Now I have several allocate_aligned operations:
|
||||
ptrs.push_back(m_segment.allocate_aligned(128, 128));
|
||||
}
|
||||
}
|
||||
catch(...){
|
||||
m_segment.deallocate(ptrs.back());
|
||||
ptrs.pop_back();
|
||||
ptrs.push_back(m_segment.allocate_aligned(128, 128));
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
*/
|
||||
#include <boost/interprocess/detail/config_end.hpp>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2006-2007. Distributed under the Boost
|
||||
// (C) Copyright Ion Gaztanaga 2006-2009. 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)
|
||||
//
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2006-2007. Distributed under the Boost
|
||||
// (C) Copyright Ion Gaztanaga 2006-2009. 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)
|
||||
//
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2006-2008. Distributed under the Boost
|
||||
// (C) Copyright Ion Gaztanaga 2006-2009. 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)
|
||||
//
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2006-2007. Distributed under the Boost
|
||||
// (C) Copyright Ion Gaztanaga 2006-2009. 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)
|
||||
//
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2006-2007. Distributed under the Boost
|
||||
// (C) Copyright Ion Gaztanaga 2006-2009. 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)
|
||||
//
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2006-2007. Distributed under the Boost
|
||||
// (C) Copyright Ion Gaztanaga 2006-2009. 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)
|
||||
//
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2006-2007. Distributed under the Boost
|
||||
// (C) Copyright Ion Gaztanaga 2006-2009. 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)
|
||||
//
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2006-2007. Distributed under the Boost
|
||||
// (C) Copyright Ion Gaztanaga 2006-2009. 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)
|
||||
//
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2006-2007. Distributed under the Boost
|
||||
// (C) Copyright Ion Gaztanaga 2006-2009. 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)
|
||||
//
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2006-2007. Distributed under the Boost
|
||||
// (C) Copyright Ion Gaztanaga 2006-2009. 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)
|
||||
//
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2006-2007. Distributed under the Boost
|
||||
// (C) Copyright Ion Gaztanaga 2006-2009. 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)
|
||||
//
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2006-2007. Distributed under the Boost
|
||||
// (C) Copyright Ion Gaztanaga 2006-2009. 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)
|
||||
//
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2006-2007. Distributed under the Boost
|
||||
// (C) Copyright Ion Gaztanaga 2006-2009. 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)
|
||||
//
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2006-2007. Distributed under the Boost
|
||||
// (C) Copyright Ion Gaztanaga 2006-2009. 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)
|
||||
//
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2006-2007. Distributed under the Boost
|
||||
// (C) Copyright Ion Gaztanaga 2006-2009. 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)
|
||||
//
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2006-2007. Distributed under the Boost
|
||||
// (C) Copyright Ion Gaztanaga 2006-2009. 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)
|
||||
//
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2006-2007. Distributed under the Boost
|
||||
// (C) Copyright Ion Gaztanaga 2006-2009. 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)
|
||||
//
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2006-2007. Distributed under the Boost
|
||||
// (C) Copyright Ion Gaztanaga 2006-2009. 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)
|
||||
//
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2006-2007. Distributed under the Boost
|
||||
// (C) Copyright Ion Gaztanaga 2006-2009. 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)
|
||||
//
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2006-2007. Distributed under the Boost
|
||||
// (C) Copyright Ion Gaztanaga 2006-2009. 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)
|
||||
//
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2006-2007. Distributed under the Boost
|
||||
// (C) Copyright Ion Gaztanaga 2006-2009. 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)
|
||||
//
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2006-2007.
|
||||
// (C) Copyright Ion Gaztanaga 2006-2009.
|
||||
// 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)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2006-2007.
|
||||
// (C) Copyright Ion Gaztanaga 2006-2009.
|
||||
// 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)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2006-2007.
|
||||
// (C) Copyright Ion Gaztanaga 2006-2009.
|
||||
// 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)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2006-2007. Distributed under the Boost
|
||||
// (C) Copyright Ion Gaztanaga 2006-2009. 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)
|
||||
//
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2006-2007. Distributed under the Boost
|
||||
// (C) Copyright Ion Gaztanaga 2006-2009. 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)
|
||||
//
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2006-2007. Distributed under the Boost
|
||||
// (C) Copyright Ion Gaztanaga 2006-2009. 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)
|
||||
//
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2006-2007. Distributed under the Boost
|
||||
// (C) Copyright Ion Gaztanaga 2006-2009. 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)
|
||||
//
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2006-2007. Distributed under the Boost
|
||||
// (C) Copyright Ion Gaztanaga 2006-2009. 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)
|
||||
//
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<!--
|
||||
Copyright 2005-2008 Ion Gaztanaga
|
||||
Copyright 2005-2009 Ion Gaztanaga
|
||||
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)
|
||||
-->
|
||||
|
||||
@@ -55,10 +55,10 @@
|
||||
|
||||
-> operator >> and similar need moved_value
|
||||
|
||||
-> Add cmath workaround for Boost < 1.37
|
||||
|
||||
-> rvalue reference enabled compilers are not optimized with is_movable and move_iterator
|
||||
|
||||
-> Add allocator test template that test all new functions (allocate_many, etc.)
|
||||
|
||||
-> MacOS shm_open is non-conformant. Is there a way to know the size of a shared memory object?
|
||||
|
||||
-> swap() of multiallocaiton iterator is wrong. Try to reimplement it with slist
|
||||
@@ -387,10 +387,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "doc_named_mutex", "doc_name
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "doc_windows_shared_memory2", "doc_windows_shared_memory2.vcproj", "{5E1D6C83-31DE-4F6F-6132-87A9FB663041}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "flat_map_index_allocation_test", "flat_map_index_allocation_test.vcproj", "{51D8E9C3-2D65-48FE-3AA7-7922C0E36329}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
EndProjectSection
|
||||
@@ -833,10 +829,6 @@ Global
|
||||
{58C181B3-9516-463E-2F12-122155400054}.Debug.Build.0 = Debug|Win32
|
||||
{58C181B3-9516-463E-2F12-122155400054}.Release.ActiveCfg = Release|Win32
|
||||
{58C181B3-9516-463E-2F12-122155400054}.Release.Build.0 = Release|Win32
|
||||
{5E1D6C83-31DE-4F6F-6132-87A9FB663041}.Debug.ActiveCfg = Debug|Win32
|
||||
{5E1D6C83-31DE-4F6F-6132-87A9FB663041}.Debug.Build.0 = Debug|Win32
|
||||
{5E1D6C83-31DE-4F6F-6132-87A9FB663041}.Release.ActiveCfg = Release|Win32
|
||||
{5E1D6C83-31DE-4F6F-6132-87A9FB663041}.Release.Build.0 = Release|Win32
|
||||
{51D8E9C3-2D65-48FE-3AA7-7922C0E36329}.Debug.ActiveCfg = Debug|Win32
|
||||
{51D8E9C3-2D65-48FE-3AA7-7922C0E36329}.Debug.Build.0 = Debug|Win32
|
||||
{51D8E9C3-2D65-48FE-3AA7-7922C0E36329}.Release.ActiveCfg = Release|Win32
|
||||
|
||||
@@ -98,6 +98,9 @@
|
||||
<Filter
|
||||
Name="Containers"
|
||||
Filter="">
|
||||
<File
|
||||
RelativePath="..\..\..\..\boost\interprocess\containers\containers_fwd.hpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\..\boost\interprocess\containers\deque.hpp">
|
||||
</File>
|
||||
@@ -372,6 +375,9 @@
|
||||
<File
|
||||
RelativePath="..\..\..\..\boost\interprocess\detail\in_place_interface.hpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\..\boost\interprocess\detail\intermodule_singleton.hpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\..\boost\interprocess\detail\interprocess_tester.hpp">
|
||||
</File>
|
||||
|
||||
@@ -1,9 +1,3 @@
|
||||
#
|
||||
# Copyright Troy D. Straszheim
|
||||
#
|
||||
# Distributed under the Boost Software License, Version 1.0.
|
||||
# See http://www.boost.org/LICENSE_1_0.txt
|
||||
#
|
||||
boost_additional_test_dependencies(interprocess BOOST_DEPENDS test thread date_time multi_index)
|
||||
|
||||
|
||||
|
||||
@@ -27,6 +27,7 @@ rule test_all
|
||||
: # requirements
|
||||
<toolset>acc:<linkflags>-lrt
|
||||
<toolset>acc-pa_risc:<linkflags>-lrt
|
||||
<host-os>hpux,<toolset>gcc:<linkflags>"-Wl,+as,mpas"
|
||||
] ;
|
||||
}
|
||||
|
||||
|
||||
@@ -16,9 +16,6 @@
|
||||
using namespace boost::interprocess;
|
||||
typedef managed_shared_memory::segment_manager segment_manager_t;
|
||||
|
||||
//Explicit specialization to catch compilation errors
|
||||
template class detail::private_adaptive_node_pool_impl<segment_manager_t>;
|
||||
|
||||
int main ()
|
||||
{
|
||||
typedef detail::private_adaptive_node_pool
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2004-2007. Distributed under the Boost
|
||||
// (C) Copyright Ion Gaztanaga 2004-2009. 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)
|
||||
//
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2005-2007. Distributed under the Boost
|
||||
// (C) Copyright Ion Gaztanaga 2005-2009. 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)
|
||||
//
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2004-2007. Distributed under the Boost
|
||||
// (C) Copyright Ion Gaztanaga 2004-2009. 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)
|
||||
//
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2004-2007. Distributed under the Boost
|
||||
// (C) Copyright Ion Gaztanaga 2004-2009. 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)
|
||||
//
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2004-2007. Distributed under the Boost
|
||||
// (C) Copyright Ion Gaztanaga 2004-2009. 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)
|
||||
//
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2004-2007. Distributed under the Boost
|
||||
// (C) Copyright Ion Gaztanaga 2004-2009. 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)
|
||||
//
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2004-2008. Distributed under the Boost
|
||||
// (C) Copyright Ion Gaztanaga 2004-2009. 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)
|
||||
//
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
// It is provided "as is" without express or implied warranty.
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2005-2007. Distributed under the Boost
|
||||
// (C) Copyright Ion Gaztanaga 2005-2009. 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)
|
||||
//
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2004-2007. Distributed under the Boost
|
||||
// (C) Copyright Ion Gaztanaga 2004-2009. 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)
|
||||
//
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2004-2007. Distributed under the Boost
|
||||
// (C) Copyright Ion Gaztanaga 2004-2009. 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)
|
||||
//
|
||||
@@ -152,7 +152,7 @@ bool do_test()
|
||||
const char *const shMemName = test::get_process_id_name();
|
||||
const int max = 100;
|
||||
|
||||
try{
|
||||
/*try*/{
|
||||
shared_memory_object::remove(shMemName);
|
||||
|
||||
//Create shared memory
|
||||
@@ -167,33 +167,39 @@ bool do_test()
|
||||
|
||||
MyStdDeque *stddeque = new MyStdDeque;
|
||||
|
||||
try{
|
||||
/*try*/{
|
||||
//Compare several shared memory deque operations with std::deque
|
||||
int i;
|
||||
for(i = 0; i < max*100; ++i){
|
||||
for(i = 0; i < max*50; ++i){
|
||||
IntType move_me(i);
|
||||
shmdeque->insert(shmdeque->end(), boost::interprocess::move(move_me));
|
||||
stddeque->insert(stddeque->end(), i);
|
||||
shmdeque->insert(shmdeque->end(), IntType(i));
|
||||
stddeque->insert(stddeque->end(), int(i));
|
||||
}
|
||||
if(!test::CheckEqualContainers(shmdeque, stddeque)) return false;
|
||||
|
||||
shmdeque->clear();
|
||||
stddeque->clear();
|
||||
|
||||
for(i = 0; i < max*100; ++i){
|
||||
for(i = 0; i < max*50; ++i){
|
||||
IntType move_me(i);
|
||||
shmdeque->push_back(boost::interprocess::move(move_me));
|
||||
stddeque->push_back(i);
|
||||
shmdeque->push_back(IntType(i));
|
||||
stddeque->push_back(i);
|
||||
}
|
||||
if(!test::CheckEqualContainers(shmdeque, stddeque)) return false;
|
||||
|
||||
shmdeque->clear();
|
||||
stddeque->clear();
|
||||
|
||||
for(i = 0; i < max*100; ++i){
|
||||
for(i = 0; i < max*50; ++i){
|
||||
IntType move_me(i);
|
||||
shmdeque->push_front(boost::interprocess::move(move_me));
|
||||
stddeque->push_front(i);
|
||||
shmdeque->push_front(IntType(i));
|
||||
stddeque->push_front(int(i));
|
||||
}
|
||||
if(!test::CheckEqualContainers(shmdeque, stddeque)) return false;
|
||||
|
||||
@@ -221,8 +227,8 @@ bool do_test()
|
||||
}
|
||||
|
||||
shmdeque->insert(shmdeque->end()
|
||||
,boost::interprocess::make_move_iterator(&aux_vect[0])
|
||||
,boost::interprocess::make_move_iterator(aux_vect + 50));
|
||||
,::boost::interprocess::make_move_iterator(&aux_vect[0])
|
||||
,::boost::interprocess::make_move_iterator(aux_vect + 50));
|
||||
stddeque->insert(stddeque->end(), aux_vect2, aux_vect2 + 50);
|
||||
if(!test::CheckEqualContainers(shmdeque, stddeque)) return false;
|
||||
|
||||
@@ -243,14 +249,14 @@ bool do_test()
|
||||
aux_vect2[i] = -1;
|
||||
}
|
||||
shmdeque->insert(shmdeque->begin()
|
||||
,boost::interprocess::make_move_iterator(&aux_vect[0])
|
||||
,boost::interprocess::make_move_iterator(aux_vect + 50));
|
||||
,::boost::interprocess::make_move_iterator(&aux_vect[0])
|
||||
,::boost::interprocess::make_move_iterator(aux_vect + 50));
|
||||
stddeque->insert(stddeque->begin(), aux_vect2, aux_vect2 + 50);
|
||||
if(!test::CheckEqualContainers(shmdeque, stddeque)) return false;
|
||||
}
|
||||
|
||||
if(!copyable_only(shmdeque, stddeque
|
||||
,detail::bool_<!boost::interprocess::is_movable<IntType>::value>())){
|
||||
,detail::bool_<!::boost::interprocess::is_movable<IntType>::value>())){
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -291,18 +297,18 @@ bool do_test()
|
||||
|
||||
if(!segment.all_memory_deallocated())
|
||||
return false;
|
||||
}
|
||||
}/*
|
||||
catch(std::exception &ex){
|
||||
std::cout << ex.what() << std::endl;
|
||||
return false;
|
||||
}
|
||||
}*/
|
||||
|
||||
std::cout << std::endl << "Test OK!" << std::endl;
|
||||
}
|
||||
}/*
|
||||
catch(...){
|
||||
shared_memory_object::remove(shMemName);
|
||||
throw;
|
||||
}
|
||||
}*/
|
||||
shared_memory_object::remove(shMemName);
|
||||
return true;
|
||||
}
|
||||
@@ -315,6 +321,9 @@ int main ()
|
||||
if(!do_test<test::movable_int, allocator>())
|
||||
return 1;
|
||||
|
||||
if(!do_test<test::copyable_int, allocator>())
|
||||
return 1;
|
||||
|
||||
if(!do_test<int, test::allocator_v1>())
|
||||
return 1;
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2005-2007. Distributed under the Boost
|
||||
// (C) Copyright Ion Gaztanaga 2005-2009. 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)
|
||||
//
|
||||
|
||||
@@ -25,11 +25,9 @@ namespace test{
|
||||
class EmplaceInt
|
||||
{
|
||||
private:
|
||||
EmplaceInt (const EmplaceInt &o);
|
||||
EmplaceInt& operator=(const EmplaceInt &o);
|
||||
BOOST_INTERPROCESS_MOVABLE_BUT_NOT_COPYABLE(EmplaceInt)
|
||||
|
||||
public:
|
||||
BOOST_INTERPROCESS_ENABLE_MOVE_EMULATION(EmplaceInt)
|
||||
|
||||
EmplaceInt(int a = 0, int b = 0, int c = 0, int d = 0, int e = 0)
|
||||
: a_(a), b_(b), c_(c), d_(d), e_(e)
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
//
|
||||
// This file is the adaptation of shared_from_this_test.cpp from smart_ptr library
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2005-2008. Distributed under the Boost
|
||||
// (C) Copyright Ion Gaztanaga 2005-2009. 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)
|
||||
//
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2005-2007. Distributed under the Boost
|
||||
// (C) Copyright Ion Gaztanaga 2005-2009. 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)
|
||||
//
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2004-2008. Distributed under the Boost
|
||||
// (C) Copyright Ion Gaztanaga 2004-2009. 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)
|
||||
//
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2004-2007. Distributed under the Boost
|
||||
// (C) Copyright Ion Gaztanaga 2004-2009. 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)
|
||||
//
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2004-2007. Distributed under the Boost
|
||||
// (C) Copyright Ion Gaztanaga 2004-2009. 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)
|
||||
//
|
||||
@@ -77,6 +77,10 @@ typedef allocator<std::pair<test::movable_int, test::movable_int>, my_managed_sh
|
||||
|
||||
typedef allocator<test::movable_and_copyable_int, my_managed_shared_memory::segment_manager>
|
||||
shmem_move_copy_allocator_t;
|
||||
|
||||
typedef allocator<test::copyable_int, my_managed_shared_memory::segment_manager>
|
||||
shmem_copy_allocator_t;
|
||||
|
||||
typedef allocator<std::pair<test::movable_and_copyable_int, test::movable_and_copyable_int>, my_managed_shared_memory::segment_manager>
|
||||
shmem_move_copy_pair_allocator_t;
|
||||
|
||||
@@ -106,6 +110,12 @@ typedef flat_set<test::movable_and_copyable_int, std::less<test::movable_and_cop
|
||||
,shmem_move_copy_allocator_t> MyMoveCopyShmSet;
|
||||
typedef flat_multiset<test::movable_and_copyable_int,std::less<test::movable_and_copyable_int>
|
||||
,shmem_move_copy_allocator_t> MyMoveCopyShmMultiSet;
|
||||
|
||||
typedef flat_set<test::copyable_int, std::less<test::copyable_int>
|
||||
,shmem_copy_allocator_t> MyCopyShmSet;
|
||||
typedef flat_multiset<test::copyable_int,std::less<test::copyable_int>
|
||||
,shmem_copy_allocator_t> MyCopyShmMultiSet;
|
||||
|
||||
typedef flat_map<test::movable_and_copyable_int, test::movable_and_copyable_int
|
||||
,std::less<test::movable_and_copyable_int>
|
||||
,shmem_move_copy_pair_allocator_t> MyMoveCopyShmMap;
|
||||
@@ -128,6 +138,12 @@ class recursive_flat_map
|
||||
public:
|
||||
int id_;
|
||||
flat_map<recursive_flat_map, recursive_flat_map> map_;
|
||||
recursive_flat_map (const recursive_flat_map&x)
|
||||
:id_(x.id_), map_(x.map_)
|
||||
{}
|
||||
recursive_flat_map &operator=(const recursive_flat_map &x)
|
||||
{ id_ = x.id_; map_ = x.map_; return *this; }
|
||||
|
||||
friend bool operator< (const recursive_flat_map &a, const recursive_flat_map &b)
|
||||
{ return a.id_ < b.id_; }
|
||||
};
|
||||
@@ -147,6 +163,11 @@ class recursive_flat_multimap
|
||||
public:
|
||||
int id_;
|
||||
flat_map<recursive_flat_multimap, recursive_flat_multimap> map_;
|
||||
recursive_flat_multimap (const recursive_flat_multimap&x)
|
||||
:id_(x.id_), map_(x.map_)
|
||||
{}
|
||||
recursive_flat_multimap &operator=(const recursive_flat_multimap &x)
|
||||
{ id_ = x.id_; map_ = x.map_; return *this; }
|
||||
friend bool operator< (const recursive_flat_multimap &a, const recursive_flat_multimap &b)
|
||||
{ return a.id_ < b.id_; }
|
||||
};
|
||||
@@ -211,6 +232,15 @@ int main()
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (0 != set_test<my_managed_shared_memory
|
||||
,MyCopyShmSet
|
||||
,MyStdSet
|
||||
,MyCopyShmMultiSet
|
||||
,MyStdMultiSet>()){
|
||||
std::cout << "Error in set_test<MyCopyShmSet>" << std::endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (0 != map_test<my_managed_shared_memory
|
||||
,MyShmMap
|
||||
,MyStdMap
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2004-2007. Distributed under the Boost
|
||||
// (C) Copyright Ion Gaztanaga 2004-2009. 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)
|
||||
//
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2005-2007. Distributed under the Boost
|
||||
// (C) Copyright Ion Gaztanaga 2005-2009. 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)
|
||||
//
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2004-2007. Distributed under the Boost
|
||||
// (C) Copyright Ion Gaztanaga 2004-2009. 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)
|
||||
//
|
||||
@@ -27,8 +27,8 @@ template class boost::interprocess::list<test::movable_and_copyable_int,
|
||||
typedef allocator<int, managed_shared_memory::segment_manager> ShmemAllocator;
|
||||
typedef list<int, ShmemAllocator> MyList;
|
||||
|
||||
typedef allocator<volatile int, managed_shared_memory::segment_manager> ShmemVolatileAllocator;
|
||||
typedef list<volatile int, ShmemVolatileAllocator> MyVolatileList;
|
||||
//typedef allocator<volatile int, managed_shared_memory::segment_manager> ShmemVolatileAllocator;
|
||||
//typedef list<volatile int, ShmemVolatileAllocator> MyVolatileList;
|
||||
|
||||
typedef allocator<test::movable_int, managed_shared_memory::segment_manager> ShmemMoveAllocator;
|
||||
typedef list<test::movable_int, ShmemMoveAllocator> MyMoveList;
|
||||
@@ -36,6 +36,10 @@ typedef list<test::movable_int, ShmemMoveAllocator> MyMoveList;
|
||||
typedef allocator<test::movable_and_copyable_int, managed_shared_memory::segment_manager> ShmemCopyMoveAllocator;
|
||||
typedef list<test::movable_and_copyable_int, ShmemCopyMoveAllocator> MyCopyMoveList;
|
||||
|
||||
typedef allocator<test::copyable_int, managed_shared_memory::segment_manager> ShmemCopyAllocator;
|
||||
typedef list<test::copyable_int, ShmemCopyAllocator> MyCopyList;
|
||||
|
||||
|
||||
class recursive_list
|
||||
{
|
||||
public:
|
||||
@@ -62,8 +66,8 @@ int main ()
|
||||
if(test::list_test<managed_shared_memory, MyList, true>())
|
||||
return 1;
|
||||
|
||||
if(test::list_test<managed_shared_memory, MyVolatileList, true>())
|
||||
return 1;
|
||||
// if(test::list_test<managed_shared_memory, MyVolatileList, true>())
|
||||
// return 1;
|
||||
|
||||
if(test::list_test<managed_shared_memory, MyMoveList, true>())
|
||||
return 1;
|
||||
@@ -71,6 +75,9 @@ int main ()
|
||||
if(test::list_test<managed_shared_memory, MyCopyMoveList, true>())
|
||||
return 1;
|
||||
|
||||
if(test::list_test<managed_shared_memory, MyCopyList, true>())
|
||||
return 1;
|
||||
|
||||
const test::EmplaceOptions Options = (test::EmplaceOptions)(test::EMPLACE_BACK | test::EMPLACE_FRONT | test::EMPLACE_BEFORE);
|
||||
|
||||
if(!boost::interprocess::test::test_emplace<list<test::EmplaceInt>, Options>())
|
||||
|
||||
@@ -37,6 +37,8 @@ struct push_data_function
|
||||
IntType move_me(i);
|
||||
shmlist->push_back(boost::interprocess::move(move_me));
|
||||
stdlist->push_back(i);
|
||||
shmlist->push_back(IntType(i));
|
||||
stdlist->push_back(int(i));
|
||||
}
|
||||
if(!CheckEqualContainers(shmlist, stdlist))
|
||||
return 1;
|
||||
@@ -55,6 +57,8 @@ struct push_data_function<false>
|
||||
IntType move_me(i);
|
||||
shmlist->push_front(boost::interprocess::move(move_me));
|
||||
stdlist->push_front(i);
|
||||
shmlist->push_front(IntType(i));
|
||||
stdlist->push_front(int(i));
|
||||
}
|
||||
if(!CheckEqualContainers(shmlist, stdlist))
|
||||
return 1;
|
||||
@@ -115,7 +119,7 @@ int list_test (bool copied_allocators_equal = true)
|
||||
|
||||
MyStdList *stdlist = new MyStdList;
|
||||
|
||||
if(push_data_t::execute(max, shmlist, stdlist)){
|
||||
if(push_data_t::execute(max/2, shmlist, stdlist)){
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -141,8 +145,8 @@ int list_test (bool copied_allocators_equal = true)
|
||||
for(int i = 0; i < 50; ++i){
|
||||
aux_vect2[i] = -1;
|
||||
}
|
||||
shmlist->assign(boost::interprocess::make_move_iterator(&aux_vect[0])
|
||||
,boost::interprocess::make_move_iterator(&aux_vect[50]));
|
||||
shmlist->assign(::boost::interprocess::make_move_iterator(&aux_vect[0])
|
||||
,::boost::interprocess::make_move_iterator(&aux_vect[50]));
|
||||
stdlist->assign(&aux_vect2[0], &aux_vect2[50]);
|
||||
if(!CheckEqualContainers(shmlist, stdlist)) return 1;
|
||||
}
|
||||
@@ -172,8 +176,8 @@ int list_test (bool copied_allocators_equal = true)
|
||||
aux_vect2[i] = -1;
|
||||
}
|
||||
shmlist->insert(shmlist->begin()
|
||||
,boost::interprocess::make_move_iterator(&aux_vect[0])
|
||||
,boost::interprocess::make_move_iterator(&aux_vect[50]));
|
||||
,::boost::interprocess::make_move_iterator(&aux_vect[0])
|
||||
,::boost::interprocess::make_move_iterator(&aux_vect[50]));
|
||||
stdlist->insert(stdlist->begin(), &aux_vect2[0], &aux_vect2[50]);
|
||||
}
|
||||
|
||||
@@ -198,7 +202,7 @@ int list_test (bool copied_allocators_equal = true)
|
||||
if(!CheckEqualContainers(shmlist, stdlist))
|
||||
return 1;
|
||||
|
||||
if(push_data_t::execute(max, shmlist, stdlist)){
|
||||
if(push_data_t::execute(max/2, shmlist, stdlist)){
|
||||
return 1;
|
||||
}
|
||||
{
|
||||
@@ -207,7 +211,7 @@ int list_test (bool copied_allocators_equal = true)
|
||||
|
||||
int listsize = (int)shmlist->size();
|
||||
|
||||
if(push_data_t::execute(listsize, shmlist, stdlist)){
|
||||
if(push_data_t::execute(listsize/2, shmlist, stdlist)){
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -220,11 +224,11 @@ int list_test (bool copied_allocators_equal = true)
|
||||
|
||||
listsize = (int)shmlist->size();
|
||||
|
||||
if(push_data_t::execute(listsize, shmlist, stdlist)){
|
||||
if(push_data_t::execute(listsize/2, shmlist, stdlist)){
|
||||
return 1;
|
||||
}
|
||||
|
||||
if(push_data_t::execute(listsize, &othershmlist, &otherstdlist)){
|
||||
if(push_data_t::execute(listsize/2, &othershmlist, &otherstdlist)){
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -244,6 +248,13 @@ int list_test (bool copied_allocators_equal = true)
|
||||
if(!CheckEqualContainers(shmlist, stdlist))
|
||||
return 1;
|
||||
}
|
||||
|
||||
for(int i = 0; i < max; ++i){
|
||||
shmlist->insert(shmlist->begin(), IntType(i));
|
||||
stdlist->insert(stdlist->begin(), int(i));
|
||||
}
|
||||
if(!CheckEqualContainers(shmlist, stdlist))
|
||||
return 1;
|
||||
}
|
||||
|
||||
segment.template destroy<MyShmList>("MyList");
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2004-2007. Distributed under the Boost
|
||||
// (C) Copyright Ion Gaztanaga 2004-2009. 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)
|
||||
//
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2004-2007. Distributed under the Boost
|
||||
// (C) Copyright Ion Gaztanaga 2004-2009. 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)
|
||||
//
|
||||
@@ -122,6 +122,7 @@ int main ()
|
||||
if(!shmem_vect)
|
||||
return -1;
|
||||
}
|
||||
#ifndef BOOST_INTERPROCESS_POSIX_SHARED_MEMORY_OBJECTS_NO_GROW
|
||||
{
|
||||
std::size_t old_free_memory;
|
||||
{
|
||||
@@ -196,14 +197,16 @@ int main ()
|
||||
if(next_shmem_size <= final_shmem_size)
|
||||
return -1;
|
||||
}
|
||||
{
|
||||
//Now test move semantics
|
||||
managed_shared_memory original(open_only, ShmemName);
|
||||
managed_shared_memory move_ctor(boost::interprocess::move(original));
|
||||
managed_shared_memory move_assign;
|
||||
move_assign = boost::interprocess::move(move_ctor);
|
||||
move_assign.swap(original);
|
||||
}
|
||||
}
|
||||
#endif //ifndef BOOST_INTERPROCESS_POSIX_SHARED_MEMORY_OBJECTS_NO_GROW
|
||||
|
||||
{
|
||||
//Now test move semantics
|
||||
managed_shared_memory original(open_only, ShmemName);
|
||||
managed_shared_memory move_ctor(boost::interprocess::move(original));
|
||||
managed_shared_memory move_assign;
|
||||
move_assign = boost::interprocess::move(move_ctor);
|
||||
move_assign.swap(original);
|
||||
}
|
||||
|
||||
shared_memory_object::remove(ShmemName);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2004-2007. Distributed under the Boost
|
||||
// (C) Copyright Ion Gaztanaga 2004-2009. 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)
|
||||
//
|
||||
|
||||
@@ -94,26 +94,75 @@ int map_test ()
|
||||
|
||||
MyShmMap *shmmap2 =
|
||||
segment.template construct<MyShmMap>("MyShmMap2")
|
||||
(boost::interprocess::make_move_iterator(&aux_vect[0])
|
||||
, boost::interprocess::make_move_iterator(aux_vect + 50)
|
||||
( ::boost::interprocess::make_move_iterator(&aux_vect[0])
|
||||
, ::boost::interprocess::make_move_iterator(aux_vect + 50)
|
||||
, std::less<IntType>(), segment.get_segment_manager());
|
||||
|
||||
MyStdMap *stdmap2 = new MyStdMap(aux_vect2, aux_vect2 + 50);
|
||||
|
||||
MyShmMultiMap *shmmultimap2 =
|
||||
segment.template construct<MyShmMultiMap>("MyShmMultiMap2")
|
||||
(boost::interprocess::make_move_iterator(&aux_vect3[0])
|
||||
, boost::interprocess::make_move_iterator(aux_vect3 + 50)
|
||||
( ::boost::interprocess::make_move_iterator(&aux_vect3[0])
|
||||
, ::boost::interprocess::make_move_iterator(aux_vect3 + 50)
|
||||
, std::less<IntType>(), segment.get_segment_manager());
|
||||
|
||||
MyStdMultiMap *stdmultimap2 = new MyStdMultiMap(aux_vect2, aux_vect2 + 50);
|
||||
if(!CheckEqualContainers(shmmap2, stdmap2)) return 1;
|
||||
if(!CheckEqualContainers(shmmultimap2, stdmultimap2)) return 1;
|
||||
|
||||
//ordered range insertion
|
||||
//This is really nasty, but we have no other simple choice
|
||||
for(int i = 0; i < 50; ++i){
|
||||
IntType i1(i);
|
||||
IntType i2(i);
|
||||
new(&aux_vect[i])IntPairType(boost::interprocess::move(i1), boost::interprocess::move(i2));
|
||||
}
|
||||
|
||||
for(int i = 0; i < 50; ++i){
|
||||
new(&aux_vect2[i])StdValueType(StdKeyType(i), StdMappedType(i));
|
||||
}
|
||||
|
||||
for(int i = 0; i < 50; ++i){
|
||||
IntType i1(i);
|
||||
IntType i2(i);
|
||||
new(&aux_vect3[i])IntPairType(boost::interprocess::move(i1), boost::interprocess::move(i2));
|
||||
}
|
||||
|
||||
MyShmMap *shmmap3 =
|
||||
segment.template construct<MyShmMap>("MyShmMap3")
|
||||
( ordered_unique_range
|
||||
, ::boost::interprocess::make_move_iterator(&aux_vect[0])
|
||||
, ::boost::interprocess::make_move_iterator(aux_vect + 50)
|
||||
, std::less<IntType>(), segment.get_segment_manager());
|
||||
|
||||
MyStdMap *stdmap3 = new MyStdMap(aux_vect2, aux_vect2 + 50);
|
||||
|
||||
MyShmMultiMap *shmmultimap3 =
|
||||
segment.template construct<MyShmMultiMap>("MyShmMultiMap3")
|
||||
( ordered_range
|
||||
, ::boost::interprocess::make_move_iterator(&aux_vect3[0])
|
||||
, ::boost::interprocess::make_move_iterator(aux_vect3 + 50)
|
||||
, std::less<IntType>(), segment.get_segment_manager());
|
||||
|
||||
MyStdMultiMap *stdmultimap3 = new MyStdMultiMap(aux_vect2, aux_vect2 + 50);
|
||||
|
||||
if(!CheckEqualContainers(shmmap3, stdmap3)){
|
||||
std::cout << "Error in construct<MyShmMap>(MyShmMap3)" << std::endl;
|
||||
return 1;
|
||||
}
|
||||
if(!CheckEqualContainers(shmmultimap3, stdmultimap3)){
|
||||
std::cout << "Error in construct<MyShmMultiMap>(MyShmMultiMap3)" << std::endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
segment.destroy_ptr(shmmap2);
|
||||
segment.destroy_ptr(shmmultimap2);
|
||||
delete stdmap2;
|
||||
delete stdmultimap2;
|
||||
segment.destroy_ptr(shmmap3);
|
||||
segment.destroy_ptr(shmmultimap3);
|
||||
delete stdmap3;
|
||||
delete stdmultimap3;
|
||||
}
|
||||
{
|
||||
//This is really nasty, but we have no other simple choice
|
||||
@@ -191,8 +240,8 @@ int map_test ()
|
||||
new(&aux_vect3[i])IntPairType(boost::interprocess::move(i1), boost::interprocess::move(i2));
|
||||
}
|
||||
|
||||
shmmap->insert(boost::interprocess::make_move_iterator(&aux_vect[0]), boost::interprocess::make_move_iterator(aux_vect + 50));
|
||||
shmmultimap->insert(boost::interprocess::make_move_iterator(&aux_vect3[0]), boost::interprocess::make_move_iterator(aux_vect3 + 50));
|
||||
shmmap->insert(::boost::interprocess::make_move_iterator(&aux_vect[0]), ::boost::interprocess::make_move_iterator(aux_vect + 50));
|
||||
shmmultimap->insert(::boost::interprocess::make_move_iterator(&aux_vect3[0]), ::boost::interprocess::make_move_iterator(aux_vect3 + 50));
|
||||
for(std::size_t i = 0; i != 50; ++i){
|
||||
StdPairType stdpairtype(-1, -1);
|
||||
stdmap->insert(stdpairtype);
|
||||
@@ -239,10 +288,10 @@ int map_test ()
|
||||
new(&aux_vect5[i])IntPairType(boost::interprocess::move(i1), boost::interprocess::move(i2));
|
||||
}
|
||||
|
||||
shmmap->insert(boost::interprocess::make_move_iterator(&aux_vect[0]), boost::interprocess::make_move_iterator(aux_vect + 50));
|
||||
shmmap->insert(boost::interprocess::make_move_iterator(&aux_vect3[0]), boost::interprocess::make_move_iterator(aux_vect3 + 50));
|
||||
shmmultimap->insert(boost::interprocess::make_move_iterator(&aux_vect4[0]), boost::interprocess::make_move_iterator(aux_vect4 + 50));
|
||||
shmmultimap->insert(boost::interprocess::make_move_iterator(&aux_vect5[0]), boost::interprocess::make_move_iterator(aux_vect5 + 50));
|
||||
shmmap->insert(::boost::interprocess::make_move_iterator(&aux_vect[0]), ::boost::interprocess::make_move_iterator(aux_vect + 50));
|
||||
shmmap->insert(::boost::interprocess::make_move_iterator(&aux_vect3[0]), ::boost::interprocess::make_move_iterator(aux_vect3 + 50));
|
||||
shmmultimap->insert(::boost::interprocess::make_move_iterator(&aux_vect4[0]), ::boost::interprocess::make_move_iterator(aux_vect4 + 50));
|
||||
shmmultimap->insert(::boost::interprocess::make_move_iterator(&aux_vect5[0]), ::boost::interprocess::make_move_iterator(aux_vect5 + 50));
|
||||
|
||||
for(std::size_t i = 0; i != 50; ++i){
|
||||
StdPairType stdpairtype(-1, -1);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2004-2007. Distributed under the Boost
|
||||
// (C) Copyright Ion Gaztanaga 2004-2009. 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)
|
||||
//
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2004-2007. Distributed under the Boost
|
||||
// (C) Copyright Ion Gaztanaga 2004-2009. 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)
|
||||
//
|
||||
|
||||
@@ -21,11 +21,9 @@ namespace test {
|
||||
|
||||
class movable_int
|
||||
{
|
||||
movable_int(movable_int&);
|
||||
movable_int &operator= (movable_int&);
|
||||
BOOST_INTERPROCESS_MOVABLE_BUT_NOT_COPYABLE(movable_int)
|
||||
|
||||
public:
|
||||
BOOST_INTERPROCESS_ENABLE_MOVE_EMULATION(movable_int)
|
||||
|
||||
movable_int()
|
||||
: m_int(0)
|
||||
@@ -81,8 +79,8 @@ std::basic_ostream<E, T> & operator<<
|
||||
|
||||
class movable_and_copyable_int
|
||||
{
|
||||
BOOST_COPYABLE_AND_MOVABLE(movable_and_copyable_int)
|
||||
public:
|
||||
BOOST_INTERPROCESS_ENABLE_MOVE_EMULATION(movable_and_copyable_int)
|
||||
|
||||
movable_and_copyable_int()
|
||||
: m_int(0)
|
||||
@@ -96,7 +94,7 @@ class movable_and_copyable_int
|
||||
: m_int(mmi.m_int)
|
||||
{}
|
||||
|
||||
movable_and_copyable_int &operator= (const movable_and_copyable_int& mi)
|
||||
movable_and_copyable_int &operator= (BOOST_INTERPROCESS_COPY_ASSIGN_REF(movable_and_copyable_int) mi)
|
||||
{ this->m_int = mi.m_int; return *this; }
|
||||
|
||||
movable_and_copyable_int(BOOST_INTERPROCESS_RV_REF(movable_and_copyable_int) mmi)
|
||||
@@ -143,6 +141,64 @@ std::basic_ostream<E, T> & operator<<
|
||||
return os;
|
||||
}
|
||||
|
||||
|
||||
class copyable_int
|
||||
{
|
||||
public:
|
||||
copyable_int()
|
||||
: m_int(0)
|
||||
{}
|
||||
|
||||
explicit copyable_int(int a)
|
||||
: m_int(a)
|
||||
{}
|
||||
|
||||
copyable_int(const copyable_int& mmi)
|
||||
: m_int(mmi.m_int)
|
||||
{}
|
||||
|
||||
copyable_int & operator= (const copyable_int &mi)
|
||||
{ this->m_int = mi.m_int; return *this; }
|
||||
|
||||
copyable_int & operator= (int i)
|
||||
{ this->m_int = i; return *this; }
|
||||
|
||||
bool operator ==(const copyable_int &mi) const
|
||||
{ return this->m_int == mi.m_int; }
|
||||
|
||||
bool operator !=(const copyable_int &mi) const
|
||||
{ return this->m_int != mi.m_int; }
|
||||
|
||||
bool operator <(const copyable_int &mi) const
|
||||
{ return this->m_int < mi.m_int; }
|
||||
|
||||
bool operator <=(const copyable_int &mi) const
|
||||
{ return this->m_int <= mi.m_int; }
|
||||
|
||||
bool operator >=(const copyable_int &mi) const
|
||||
{ return this->m_int >= mi.m_int; }
|
||||
|
||||
bool operator >(const copyable_int &mi) const
|
||||
{ return this->m_int > mi.m_int; }
|
||||
|
||||
int get_int() const
|
||||
{ return m_int; }
|
||||
|
||||
private:
|
||||
int m_int;
|
||||
};
|
||||
|
||||
template<class E, class T>
|
||||
std::basic_ostream<E, T> & operator<<
|
||||
(std::basic_ostream<E, T> & os, copyable_int const & p)
|
||||
|
||||
{
|
||||
os << p.get_int();
|
||||
return os;
|
||||
}
|
||||
|
||||
|
||||
|
||||
} //namespace test {
|
||||
} //namespace interprocess {
|
||||
} //namespace boost {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2006-2007. Distributed under the Boost
|
||||
// (C) Copyright Ion Gaztanaga 2006-2009. 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)
|
||||
//
|
||||
@@ -37,6 +37,17 @@ struct employee
|
||||
int id;
|
||||
int age;
|
||||
shm_string name;
|
||||
|
||||
employee(const employee &e)
|
||||
: id(e.id), age(e.age), name(e.name)
|
||||
{}
|
||||
|
||||
employee &operator=(const employee &e)
|
||||
{
|
||||
id = e.id; age = e.age; name = e.name;
|
||||
return *this;
|
||||
}
|
||||
|
||||
employee( int id_
|
||||
, int age_
|
||||
, const char *name_
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2004-2007. Distributed under the Boost
|
||||
// (C) Copyright Ion Gaztanaga 2004-2009. 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)
|
||||
//
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2004-2007. Distributed under the Boost
|
||||
// (C) Copyright Ion Gaztanaga 2004-2009. 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)
|
||||
//
|
||||
@@ -234,6 +234,7 @@ void test_mutex_lock()
|
||||
|
||||
//Wait completion
|
||||
tm1.join();
|
||||
boost::thread::sleep(xsecs(1*BaseSeconds));
|
||||
tm2.join();
|
||||
|
||||
assert(d1.m_value == 1);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2004-2007. Distributed under the Boost
|
||||
// (C) Copyright Ion Gaztanaga 2004-2009. 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)
|
||||
//
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2008-2008. Distributed under the Boost
|
||||
// (C) Copyright Ion Gaztanaga 2008-2009. 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)
|
||||
//
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2004-2007. Distributed under the Boost
|
||||
// (C) Copyright Ion Gaztanaga 2004-2009. 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)
|
||||
//
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2004-2007. Distributed under the Boost
|
||||
// (C) Copyright Ion Gaztanaga 2004-2009. 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)
|
||||
//
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2004-2007. Distributed under the Boost
|
||||
// (C) Copyright Ion Gaztanaga 2004-2009. 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)
|
||||
//
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user