Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r76181 - in branches/release/boost/interprocess: . allocators allocators/detail containers detail indexes ipc mem_algo mem_algo/detail smart_ptr smart_ptr/detail sync sync/emulation sync/posix
From: igaztanaga_at_[hidden]
Date: 2011-12-26 12:21:48


Author: igaztanaga
Date: 2011-12-26 12:21:36 EST (Mon, 26 Dec 2011)
New Revision: 76181
URL: http://svn.boost.org/trac/boost/changeset/76181

Log:
Changes for 1.49
Removed:
   branches/release/boost/interprocess/sync/emulation/
   branches/release/boost/interprocess/sync/interprocess_barrier.hpp
   branches/release/boost/interprocess/sync/posix/interprocess_recursive_mutex.hpp
Text files modified:
   branches/release/boost/interprocess/allocators/adaptive_pool.hpp | 16
   branches/release/boost/interprocess/allocators/allocator.hpp | 33 +-
   branches/release/boost/interprocess/allocators/cached_adaptive_pool.hpp | 2
   branches/release/boost/interprocess/allocators/cached_node_allocator.hpp | 2
   branches/release/boost/interprocess/allocators/detail/adaptive_node_pool.hpp | 6
   branches/release/boost/interprocess/allocators/detail/allocator_common.hpp | 70 +++----
   branches/release/boost/interprocess/allocators/detail/node_pool.hpp | 6
   branches/release/boost/interprocess/allocators/detail/node_tools.hpp | 2
   branches/release/boost/interprocess/allocators/node_allocator.hpp | 12
   branches/release/boost/interprocess/allocators/private_adaptive_pool.hpp | 4
   branches/release/boost/interprocess/allocators/private_node_allocator.hpp | 4
   branches/release/boost/interprocess/anonymous_shared_memory.hpp | 4
   branches/release/boost/interprocess/containers/allocation_type.hpp | 2
   branches/release/boost/interprocess/containers/deque.hpp | 2
   branches/release/boost/interprocess/containers/flat_map.hpp | 2
   branches/release/boost/interprocess/containers/flat_set.hpp | 2
   branches/release/boost/interprocess/containers/list.hpp | 2
   branches/release/boost/interprocess/containers/map.hpp | 2
   branches/release/boost/interprocess/containers/pair.hpp | 6
   branches/release/boost/interprocess/containers/set.hpp | 2
   branches/release/boost/interprocess/containers/slist.hpp | 2
   branches/release/boost/interprocess/containers/stable_vector.hpp | 2
   branches/release/boost/interprocess/containers/string.hpp | 2
   branches/release/boost/interprocess/containers/vector.hpp | 2
   branches/release/boost/interprocess/containers/version_type.hpp | 6
   branches/release/boost/interprocess/creation_tags.hpp | 2
   branches/release/boost/interprocess/detail/atomic.hpp | 2
   branches/release/boost/interprocess/detail/cast_tags.hpp | 2
   branches/release/boost/interprocess/detail/config_begin.hpp | 2
   branches/release/boost/interprocess/detail/config_end.hpp | 2
   branches/release/boost/interprocess/detail/file_wrapper.hpp | 4
   branches/release/boost/interprocess/detail/in_place_interface.hpp | 2
   branches/release/boost/interprocess/detail/intermodule_singleton.hpp | 196 +++++++++++++++++++--
   branches/release/boost/interprocess/detail/interprocess_tester.hpp | 2
   branches/release/boost/interprocess/detail/intersegment_ptr.hpp | 36 +--
   branches/release/boost/interprocess/detail/managed_memory_impl.hpp | 22 +-
   branches/release/boost/interprocess/detail/managed_multi_shared_memory.hpp | 32 ++-
   branches/release/boost/interprocess/detail/managed_open_or_create_impl.hpp | 86 +++++----
   branches/release/boost/interprocess/detail/math_functions.hpp | 2
   branches/release/boost/interprocess/detail/min_max.hpp | 2
   branches/release/boost/interprocess/detail/mpl.hpp | 4
   branches/release/boost/interprocess/detail/multi_segment_services.hpp | 2
   branches/release/boost/interprocess/detail/named_proxy.hpp | 46 ++--
   branches/release/boost/interprocess/detail/os_file_functions.hpp | 20 +
   branches/release/boost/interprocess/detail/os_thread_functions.hpp | 12 +
   branches/release/boost/interprocess/detail/pointer_type.hpp | 2
   branches/release/boost/interprocess/detail/posix_time_types_wrk.hpp | 2
   branches/release/boost/interprocess/detail/preprocessor.hpp | 28 +-
   branches/release/boost/interprocess/detail/robust_emulation.hpp | 32 +-
   branches/release/boost/interprocess/detail/segment_manager_helper.hpp | 33 +-
   branches/release/boost/interprocess/detail/tmp_dir_helpers.hpp | 9
   branches/release/boost/interprocess/detail/transform_iterator.hpp | 2
   branches/release/boost/interprocess/detail/type_traits.hpp | 37 +++
   branches/release/boost/interprocess/detail/utilities.hpp | 44 +---
   branches/release/boost/interprocess/detail/variadic_templates_tools.hpp | 2
   branches/release/boost/interprocess/detail/win32_api.hpp | 204 +++++++++++++----------
   branches/release/boost/interprocess/detail/workaround.hpp | 4
   branches/release/boost/interprocess/detail/xsi_shared_memory_device.hpp | 20 +-
   branches/release/boost/interprocess/detail/xsi_shared_memory_file_wrapper.hpp | 4
   branches/release/boost/interprocess/errors.hpp | 3
   branches/release/boost/interprocess/exceptions.hpp | 2
   branches/release/boost/interprocess/file_mapping.hpp | 6
   branches/release/boost/interprocess/indexes/flat_map_index.hpp | 2
   branches/release/boost/interprocess/indexes/iset_index.hpp | 4
   branches/release/boost/interprocess/indexes/iunordered_set_index.hpp | 24 +-
   branches/release/boost/interprocess/indexes/map_index.hpp | 4
   branches/release/boost/interprocess/indexes/null_index.hpp | 2
   branches/release/boost/interprocess/indexes/unordered_map_index.hpp | 6
   branches/release/boost/interprocess/interprocess_fwd.hpp | 33 ---
   branches/release/boost/interprocess/ipc/message_queue.hpp | 28 +-
   branches/release/boost/interprocess/managed_heap_memory.hpp | 11
   branches/release/boost/interprocess/managed_mapped_file.hpp | 22 +
   branches/release/boost/interprocess/managed_shared_memory.hpp | 20 +
   branches/release/boost/interprocess/managed_windows_shared_memory.hpp | 25 ++
   branches/release/boost/interprocess/managed_xsi_shared_memory.hpp | 18 +
   branches/release/boost/interprocess/mapped_region.hpp | 20 +
   branches/release/boost/interprocess/mem_algo/detail/mem_algo_common.hpp | 62 +++---
   branches/release/boost/interprocess/mem_algo/detail/multi_simple_seq_fit.hpp | 2
   branches/release/boost/interprocess/mem_algo/detail/multi_simple_seq_fit_impl.hpp | 47 ++--
   branches/release/boost/interprocess/mem_algo/detail/simple_seq_fit_impl.hpp | 49 ++--
   branches/release/boost/interprocess/mem_algo/rbtree_best_fit.hpp | 44 ++--
   branches/release/boost/interprocess/mem_algo/simple_seq_fit.hpp | 2
   branches/release/boost/interprocess/offset_ptr.hpp | 343 +++++++++++++++++++++------------------
   branches/release/boost/interprocess/permissions.hpp | 2
   branches/release/boost/interprocess/segment_manager.hpp | 18 +-
   branches/release/boost/interprocess/shared_memory_object.hpp | 12
   branches/release/boost/interprocess/smart_ptr/deleter.hpp | 4
   branches/release/boost/interprocess/smart_ptr/detail/shared_count.hpp | 10
   branches/release/boost/interprocess/smart_ptr/detail/sp_counted_base.hpp | 2
   branches/release/boost/interprocess/smart_ptr/detail/sp_counted_base_atomic.hpp | 2
   branches/release/boost/interprocess/smart_ptr/detail/sp_counted_impl.hpp | 2
   branches/release/boost/interprocess/smart_ptr/enable_shared_from_this.hpp | 4
   branches/release/boost/interprocess/smart_ptr/intrusive_ptr.hpp | 20 +-
   branches/release/boost/interprocess/smart_ptr/scoped_ptr.hpp | 7
   branches/release/boost/interprocess/smart_ptr/shared_ptr.hpp | 32 +-
   branches/release/boost/interprocess/smart_ptr/unique_ptr.hpp | 12
   branches/release/boost/interprocess/smart_ptr/weak_ptr.hpp | 2
   branches/release/boost/interprocess/sync/interprocess_mutex.hpp | 78 +++++----
   branches/release/boost/interprocess/sync/interprocess_recursive_mutex.hpp | 76 ++++----
   branches/release/boost/interprocess/sync/lock_options.hpp | 2
   branches/release/boost/interprocess/sync/mutex_family.hpp | 2
   branches/release/boost/interprocess/sync/named_condition.hpp | 235 ++-------------------------
   branches/release/boost/interprocess/sync/named_mutex.hpp | 112 ++----------
   branches/release/boost/interprocess/sync/named_recursive_mutex.hpp | 52 +----
   branches/release/boost/interprocess/sync/named_upgradable_mutex.hpp | 4
   branches/release/boost/interprocess/sync/null_mutex.hpp | 2
   branches/release/boost/interprocess/sync/sharable_lock.hpp | 10
   branches/release/boost/interprocess/windows_shared_memory.hpp | 4
   branches/release/boost/interprocess/xsi_key.hpp | 2
   branches/release/boost/interprocess/xsi_shared_memory.hpp | 4
   110 files changed, 1286 insertions(+), 1301 deletions(-)

Modified: branches/release/boost/interprocess/allocators/adaptive_pool.hpp
==============================================================================
--- branches/release/boost/interprocess/allocators/adaptive_pool.hpp (original)
+++ branches/release/boost/interprocess/allocators/adaptive_pool.hpp 2011-12-26 12:21:36 EST (Mon, 26 Dec 2011)
@@ -1,6 +1,6 @@
 //////////////////////////////////////////////////////////////////////////////
 //
-// (C) Copyright Ion Gaztanaga 2005-2009. Distributed under the Boost
+// (C) Copyright Ion Gaztanaga 2005-2011. 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)
 //
@@ -96,7 +96,7 @@
    typedef typename segment_manager::difference_type difference_type;
 
    typedef boost::interprocess::version_type<adaptive_pool_base, Version> version;
- typedef boost::container::containers_detail::transform_multiallocation_chain
+ typedef boost::container::container_detail::transform_multiallocation_chain
       <typename SegmentManager::multiallocation_chain, T>multiallocation_chain;
 
    //!Obtains adaptive_pool_base from
@@ -128,7 +128,7 @@
    adaptive_pool_base(const adaptive_pool_base &other)
       : mp_node_pool(other.get_node_pool())
    {
- node_pool<0>::get(ipcdetail::get_pointer(mp_node_pool))->inc_ref_count();
+ node_pool<0>::get(ipcdetail::to_raw_pointer(mp_node_pool))->inc_ref_count();
    }
 
    //!Assignment from other adaptive_pool_base
@@ -150,17 +150,17 @@
    //!Destructor, removes node_pool_t from memory
    //!if its reference count reaches to zero. Never throws
    ~adaptive_pool_base()
- { ipcdetail::destroy_node_pool_if_last_link(node_pool<0>::get(ipcdetail::get_pointer(mp_node_pool))); }
+ { ipcdetail::destroy_node_pool_if_last_link(node_pool<0>::get(ipcdetail::to_raw_pointer(mp_node_pool))); }
 
    //!Returns a pointer to the node pool.
    //!Never throws
    void* get_node_pool() const
- { return ipcdetail::get_pointer(mp_node_pool); }
+ { return ipcdetail::to_raw_pointer(mp_node_pool); }
 
    //!Returns the segment manager.
    //!Never throws
    segment_manager* get_segment_manager()const
- { return node_pool<0>::get(ipcdetail::get_pointer(mp_node_pool))->get_segment_manager(); }
+ { return node_pool<0>::get(ipcdetail::to_raw_pointer(mp_node_pool))->get_segment_manager(); }
 
    //!Swaps allocators. Does not throw. If each allocator is placed in a
    //!different memory segment, the result is undefined.
@@ -372,7 +372,7 @@
    //!Returns address of non mutable object.
    //!Never throws
    const_pointer address(const_reference value) const;
-
+/*
    //!Copy construct an object.
    //!Throws if T's copy constructor throws
    void construct(const pointer &ptr, const_reference v);
@@ -380,7 +380,7 @@
    //!Destroys object. Throws if object's
    //!destructor throws
    void destroy(const pointer &ptr);
-
+*/
    //!Returns maximum the number of objects the previously allocated memory
    //!pointed by p can hold. This size only works for memory allocated with
    //!allocate, allocation_command and allocate_many.

Modified: branches/release/boost/interprocess/allocators/allocator.hpp
==============================================================================
--- branches/release/boost/interprocess/allocators/allocator.hpp (original)
+++ branches/release/boost/interprocess/allocators/allocator.hpp 2011-12-26 12:21:36 EST (Mon, 26 Dec 2011)
@@ -1,6 +1,6 @@
 ///////////////////////////////////////////////////////////////////////////////
 //
-// (C) Copyright Ion Gaztanaga 2005-2009. Distributed under the Boost
+// (C) Copyright Ion Gaztanaga 2005-2011. 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)
 //
@@ -32,6 +32,7 @@
 #include <boost/interprocess/detail/type_traits.hpp>
 
 #include <memory>
+#include <new>
 #include <algorithm>
 #include <cstddef>
 #include <stdexcept>
@@ -103,7 +104,7 @@
    /// @cond
 
    //Experimental. Don't use.
- typedef boost::container::containers_detail::transform_multiallocation_chain
+ typedef boost::container::container_detail::transform_multiallocation_chain
       <typename SegmentManager::multiallocation_chain, T>multiallocation_chain;
    /// @endcond
 
@@ -118,7 +119,7 @@
    //!Returns the segment manager.
    //!Never throws
    segment_manager* get_segment_manager()const
- { return ipcdetail::get_pointer(mp_mngr); }
+ { return ipcdetail::to_raw_pointer(mp_mngr); }
 
    //!Constructor from the segment manager.
    //!Never throws
@@ -149,7 +150,7 @@
    //!Deallocates memory previously allocated.
    //!Never throws
    void deallocate(const pointer &ptr, size_type)
- { mp_mngr->deallocate((void*)ipcdetail::get_pointer(ptr)); }
+ { mp_mngr->deallocate((void*)ipcdetail::to_raw_pointer(ptr)); }
 
    //!Returns the number of elements that could be allocated.
    //!Never throws
@@ -166,7 +167,7 @@
    //!allocate, allocation_command and allocate_many.
    size_type size(const pointer &p) const
    {
- return (size_type)mp_mngr->size(ipcdetail::get_pointer(p))/sizeof(T);
+ return (size_type)mp_mngr->size(ipcdetail::to_raw_pointer(p))/sizeof(T);
    }
 
    std::pair<pointer, bool>
@@ -176,7 +177,7 @@
                          size_type &received_size, const pointer &reuse = 0)
    {
       return mp_mngr->allocation_command
- (command, limit_size, preferred_size, received_size, ipcdetail::get_pointer(reuse));
+ (command, limit_size, preferred_size, received_size, ipcdetail::to_raw_pointer(reuse));
    }
 
    //!Allocates many elements of size elem_size in a contiguous block
@@ -240,7 +241,7 @@
    //!will be assigned to received_size. Memory allocated with this function
    //!must be deallocated only with deallocate_one().
    void deallocate_individual(multiallocation_chain chain)
- { return this->deallocate_many(boost::interprocess::move(chain)); }
+ { return this->deallocate_many(boost::move(chain)); }
 
    //!Returns address of mutable object.
    //!Never throws
@@ -252,20 +253,18 @@
    const_pointer address(const_reference value) const
    { return const_pointer(boost::addressof(value)); }
 
- //!Copy construct an object
- //!Throws if T's copy constructor throws
- void construct(const pointer &ptr, const_reference v)
- { new((void*)ipcdetail::get_pointer(ptr)) value_type(v); }
-
- //!Default construct an object.
- //!Throws if T's default constructor throws
- void construct(const pointer &ptr)
- { new((void*)ipcdetail::get_pointer(ptr)) value_type; }
+ //!Constructs an object
+ //!Throws if T's constructor throws
+ //!For backwards compatibility with libraries using C++03 allocators
+ template<class P>
+ void construct(const pointer &ptr, BOOST_FWD_REF(P) p)
+ { ::new((void*)ipcdetail::to_raw_pointer(ptr)) value_type(::boost::forward<P>(p)); }
 
    //!Destroys object. Throws if object's
    //!destructor throws
    void destroy(const pointer &ptr)
    { BOOST_ASSERT(ptr != 0); (*ptr).~value_type(); }
+
 };
 
 //!Equality test for same type
@@ -293,7 +292,7 @@
 struct has_trivial_destructor
    <boost::interprocess::allocator <T, SegmentManager> >
 {
- enum { value = true };
+ static const bool value = true;
 };
 /// @endcond
 

Modified: branches/release/boost/interprocess/allocators/cached_adaptive_pool.hpp
==============================================================================
--- branches/release/boost/interprocess/allocators/cached_adaptive_pool.hpp (original)
+++ branches/release/boost/interprocess/allocators/cached_adaptive_pool.hpp 2011-12-26 12:21:36 EST (Mon, 26 Dec 2011)
@@ -1,6 +1,6 @@
 //////////////////////////////////////////////////////////////////////////////
 //
-// (C) Copyright Ion Gaztanaga 2005-2009. Distributed under the Boost
+// (C) Copyright Ion Gaztanaga 2005-2011. 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)
 //

Modified: branches/release/boost/interprocess/allocators/cached_node_allocator.hpp
==============================================================================
--- branches/release/boost/interprocess/allocators/cached_node_allocator.hpp (original)
+++ branches/release/boost/interprocess/allocators/cached_node_allocator.hpp 2011-12-26 12:21:36 EST (Mon, 26 Dec 2011)
@@ -1,6 +1,6 @@
 //////////////////////////////////////////////////////////////////////////////
 //
-// (C) Copyright Ion Gaztanaga 2005-2009. Distributed under the Boost
+// (C) Copyright Ion Gaztanaga 2005-2011. 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)
 //

Modified: branches/release/boost/interprocess/allocators/detail/adaptive_node_pool.hpp
==============================================================================
--- branches/release/boost/interprocess/allocators/detail/adaptive_node_pool.hpp (original)
+++ branches/release/boost/interprocess/allocators/detail/adaptive_node_pool.hpp 2011-12-26 12:21:36 EST (Mon, 26 Dec 2011)
@@ -1,6 +1,6 @@
 //////////////////////////////////////////////////////////////////////////////
 //
-// (C) Copyright Ion Gaztanaga 2005-2009. Distributed under the Boost
+// (C) Copyright Ion Gaztanaga 2005-2011. 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)
 //
@@ -45,10 +45,10 @@
         , unsigned char OverheadPercent
>
 class private_adaptive_node_pool
- : public boost::container::containers_detail::private_adaptive_node_pool_impl
+ : public boost::container::container_detail::private_adaptive_node_pool_impl
          <typename SegmentManager::segment_manager_base_type>
 {
- typedef boost::container::containers_detail::private_adaptive_node_pool_impl
+ typedef boost::container::container_detail::private_adaptive_node_pool_impl
       <typename SegmentManager::segment_manager_base_type> base_t;
    //Non-copyable
    private_adaptive_node_pool();

Modified: branches/release/boost/interprocess/allocators/detail/allocator_common.hpp
==============================================================================
--- branches/release/boost/interprocess/allocators/detail/allocator_common.hpp (original)
+++ branches/release/boost/interprocess/allocators/detail/allocator_common.hpp 2011-12-26 12:21:36 EST (Mon, 26 Dec 2011)
@@ -17,22 +17,21 @@
 #include <boost/pointer_to_other.hpp>
 
 #include <boost/interprocess/interprocess_fwd.hpp>
-#include <boost/interprocess/detail/utilities.hpp> //get_pointer
-#include <utility> //std::pair
+#include <boost/interprocess/detail/utilities.hpp> //to_raw_pointer
 #include <boost/utility/addressof.hpp> //boost::addressof
 #include <boost/assert.hpp> //BOOST_ASSERT
-#include <boost/assert.hpp>
 #include <boost/interprocess/exceptions.hpp> //bad_alloc
 #include <boost/interprocess/sync/scoped_lock.hpp> //scoped_lock
 #include <boost/interprocess/containers/allocation_type.hpp> //boost::interprocess::allocation_type
 #include <boost/container/detail/multiallocation_chain.hpp>
 #include <boost/interprocess/mem_algo/detail/mem_algo_common.hpp>
 #include <boost/interprocess/detail/segment_manager_helper.hpp>
-#include <algorithm> //std::swap
-#include <boost/interprocess/detail/move.hpp>
-
+#include <boost/move/move.hpp>
 #include <boost/interprocess/detail/type_traits.hpp>
 #include <boost/interprocess/detail/utilities.hpp>
+#include <algorithm> //std::swap
+#include <utility> //std::pair
+#include <new>
 
 namespace boost {
 namespace interprocess {
@@ -173,11 +172,11 @@
    ~cache_impl()
    {
       this->deallocate_all_cached_nodes();
- ipcdetail::destroy_node_pool_if_last_link(ipcdetail::get_pointer(mp_node_pool));
+ ipcdetail::destroy_node_pool_if_last_link(ipcdetail::to_raw_pointer(mp_node_pool));
    }
 
    NodePool *get_node_pool() const
- { return ipcdetail::get_pointer(mp_node_pool); }
+ { return ipcdetail::to_raw_pointer(mp_node_pool); }
 
    segment_manager *get_segment_manager() const
    { return mp_node_pool->get_segment_manager(); }
@@ -191,7 +190,7 @@
       if(m_cached_nodes.empty()){
          m_cached_nodes = mp_node_pool->allocate_nodes(m_max_cached_nodes/2);
       }
- void *ret = ipcdetail::get_pointer(m_cached_nodes.front());
+ void *ret = ipcdetail::to_raw_pointer(m_cached_nodes.front());
       m_cached_nodes.pop_front();
       return ret;
    }
@@ -203,7 +202,7 @@
       BOOST_TRY{
          //If don't have any cached node, we have to get a new list of free nodes from the pool
          while(!m_cached_nodes.empty() && count--){
- void *ret = ipcdetail::get_pointer(m_cached_nodes.front());
+ void *ret = ipcdetail::to_raw_pointer(m_cached_nodes.front());
             m_cached_nodes.pop_front();
             chain.push_back(ret);
             ++allocated;
@@ -213,10 +212,10 @@
             multiallocation_chain chain2(mp_node_pool->allocate_nodes(n - allocated));
             chain.splice_after(chain.last(), chain2, chain2.before_begin(), chain2.last(), n - allocated);
          }
- return boost::interprocess::move(chain);
+ return boost::move(chain);
       }
       BOOST_CATCH(...){
- this->cached_deallocation(boost::interprocess::move(chain));
+ this->cached_deallocation(boost::move(chain));
          BOOST_RETHROW
       }
       BOOST_CATCH_END
@@ -262,7 +261,7 @@
    void deallocate_all_cached_nodes()
    {
       if(m_cached_nodes.empty()) return;
- mp_node_pool->deallocate_nodes(boost::interprocess::move(m_cached_nodes));
+ mp_node_pool->deallocate_nodes(boost::move(m_cached_nodes));
    }
 
    private:
@@ -290,7 +289,7 @@
       multiallocation_chain chain;
       chain.splice_after(chain.before_begin(), m_cached_nodes, m_cached_nodes.before_begin(), it, n);
       //Deallocate all new linked list at once
- mp_node_pool->deallocate_nodes(boost::interprocess::move(chain));
+ mp_node_pool->deallocate_nodes(boost::move(chain));
    }
 
    public:
@@ -324,7 +323,7 @@
                      <const value_type>::type const_reference;
    typedef typename SegmentManager::size_type size_type;
    typedef typename SegmentManager::difference_type difference_type;
- typedef boost::container::containers_detail::transform_multiallocation_chain
+ typedef boost::container::container_detail::transform_multiallocation_chain
       <typename SegmentManager::multiallocation_chain, T>multiallocation_chain;
 
 
@@ -334,7 +333,7 @@
    //!allocate, allocation_command and allocate_many.
    size_type size(const pointer &p) const
    {
- return (size_type)this->derived()->get_segment_manager()->size(ipcdetail::get_pointer(p))/sizeof(T);
+ return (size_type)this->derived()->get_segment_manager()->size(ipcdetail::to_raw_pointer(p))/sizeof(T);
    }
 
    std::pair<pointer, bool>
@@ -344,7 +343,7 @@
                          size_type &received_size, const pointer &reuse = 0)
    {
       return this->derived()->get_segment_manager()->allocation_command
- (command, limit_size, preferred_size, received_size, ipcdetail::get_pointer(reuse));
+ (command, limit_size, preferred_size, received_size, ipcdetail::to_raw_pointer(reuse));
    }
 
    //!Allocates many elements of size elem_size in a contiguous block
@@ -373,7 +372,7 @@
    //!will be assigned to received_size. The elements must be deallocated
    //!with deallocate(...)
    void deallocate_many(multiallocation_chain chain)
- { return this->derived()->get_segment_manager()->deallocate_many(boost::interprocess::move(chain)); }
+ { return this->derived()->get_segment_manager()->deallocate_many(boost::move(chain)); }
 
    //!Returns the number of elements that could be
    //!allocated. Never throws
@@ -390,15 +389,12 @@
    const_pointer address(const_reference value) const
    { return const_pointer(boost::addressof(value)); }
 
- //!Default construct an object.
- //!Throws if T's default constructor throws
- void construct(const pointer &ptr)
- { new((void*)ipcdetail::get_pointer(ptr)) value_type; }
-
- //!Copy construct an object
- //!Throws if T's copy constructor throws
- void construct(const pointer &ptr, const_reference v)
- { new((void*)ipcdetail::get_pointer(ptr)) value_type(v); }
+ //!Constructs an object
+ //!Throws if T's constructor throws
+ //!For backwards compatibility with libraries using C++03 allocators
+ template<class P>
+ void construct(const pointer &ptr, BOOST_FWD_REF(P) p)
+ { ::new((void*)ipcdetail::to_raw_pointer(ptr)) value_type(::boost::forward<P>(p)); }
 
    //!Destroys object. Throws if object's
    //!destructor throws
@@ -435,7 +431,7 @@
                      <const value_type>::type const_reference;
    typedef typename SegmentManager::size_type size_type;
    typedef typename SegmentManager::difference_type difference_type;
- typedef boost::container::containers_detail::transform_multiallocation_chain
+ typedef boost::container::container_detail::transform_multiallocation_chain
       <typename SegmentManager::multiallocation_chain, T>multiallocation_chain;
 
 
@@ -472,9 +468,9 @@
       typedef typename node_pool<0>::type node_pool_t;
       node_pool_t *pool = node_pool<0>::get(this->derived()->get_node_pool());
       if(Version == 1 && count == 1)
- pool->deallocate_node(ipcdetail::get_pointer(ptr));
+ pool->deallocate_node(ipcdetail::to_raw_pointer(ptr));
       else
- pool->get_segment_manager()->deallocate((void*)ipcdetail::get_pointer(ptr));
+ pool->get_segment_manager()->deallocate((void*)ipcdetail::to_raw_pointer(ptr));
    }
 
    //!Allocates just one object. Memory allocated with this function
@@ -507,7 +503,7 @@
    {
       typedef typename node_pool<0>::type node_pool_t;
       node_pool_t *pool = node_pool<0>::get(this->derived()->get_node_pool());
- pool->deallocate_node(ipcdetail::get_pointer(p));
+ pool->deallocate_node(ipcdetail::to_raw_pointer(p));
    }
 
    //!Allocates many elements of size == 1 in a contiguous block
@@ -556,7 +552,7 @@
    typedef typename base_t::value_type value_type;
 
    public:
- enum { DEFAULT_MAX_CACHED_NODES = 64 };
+ static const std::size_t DEFAULT_MAX_CACHED_NODES = 64;
 
    cached_allocator_impl(segment_manager *segment_mngr, size_type max_cached_nodes)
       : m_cache(segment_mngr, max_cached_nodes)
@@ -618,10 +614,10 @@
    {
       (void)count;
       if(Version == 1 && count == 1){
- m_cache.cached_deallocation(ipcdetail::get_pointer(ptr));
+ m_cache.cached_deallocation(ipcdetail::to_raw_pointer(ptr));
       }
       else{
- this->get_segment_manager()->deallocate((void*)ipcdetail::get_pointer(ptr));
+ this->get_segment_manager()->deallocate((void*)ipcdetail::to_raw_pointer(ptr));
       }
    }
 
@@ -644,7 +640,7 @@
    //!You should never use deallocate_one to deallocate memory allocated
    //!with other functions different from allocate_one(). Never throws
    void deallocate_one(const pointer &p)
- { this->m_cache.cached_deallocation(ipcdetail::get_pointer(p)); }
+ { this->m_cache.cached_deallocation(ipcdetail::to_raw_pointer(p)); }
 
    //!Allocates many elements of size == 1 in a contiguous block
    //!of memory. The minimum number to be allocated is min_elements,
@@ -656,7 +652,7 @@
    {
       typename node_pool_t::multiallocation_chain mem
          (chain.extract_multiallocation_chain());
- m_cache.cached_deallocation(boost::interprocess::move(mem));
+ m_cache.cached_deallocation(boost::move(mem));
    }
 
    //!Deallocates all free blocks of the pool
@@ -778,7 +774,7 @@
       //-----------------------
       boost::interprocess::scoped_lock<mutex_type> guard(m_header);
       //-----------------------
- private_node_allocator_t::deallocate_nodes(boost::interprocess::move(chain));
+ private_node_allocator_t::deallocate_nodes(boost::move(chain));
    }
 
    //!Deallocates all the free blocks of memory. Never throws

Modified: branches/release/boost/interprocess/allocators/detail/node_pool.hpp
==============================================================================
--- branches/release/boost/interprocess/allocators/detail/node_pool.hpp (original)
+++ branches/release/boost/interprocess/allocators/detail/node_pool.hpp 2011-12-26 12:21:36 EST (Mon, 26 Dec 2011)
@@ -1,6 +1,6 @@
 //////////////////////////////////////////////////////////////////////////////
 //
-// (C) Copyright Ion Gaztanaga 2005-2009. Distributed under the Boost
+// (C) Copyright Ion Gaztanaga 2005-2011. 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)
 //
@@ -44,10 +44,10 @@
 template< class SegmentManager, std::size_t NodeSize, std::size_t NodesPerBlock >
 class private_node_pool
    //Inherit from the implementation to avoid template bloat
- : public boost::container::containers_detail::
+ : public boost::container::container_detail::
          private_node_pool_impl<typename SegmentManager::segment_manager_base_type>
 {
- typedef boost::container::containers_detail::private_node_pool_impl
+ typedef boost::container::container_detail::private_node_pool_impl
       <typename SegmentManager::segment_manager_base_type> base_t;
    //Non-copyable
    private_node_pool();

Modified: branches/release/boost/interprocess/allocators/detail/node_tools.hpp
==============================================================================
--- branches/release/boost/interprocess/allocators/detail/node_tools.hpp (original)
+++ branches/release/boost/interprocess/allocators/detail/node_tools.hpp 2011-12-26 12:21:36 EST (Mon, 26 Dec 2011)
@@ -1,6 +1,6 @@
 //////////////////////////////////////////////////////////////////////////////
 //
-// (C) Copyright Ion Gaztanaga 2007-2009. Distributed under the Boost
+// (C) Copyright Ion Gaztanaga 2007-2011. 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)
 //

Modified: branches/release/boost/interprocess/allocators/node_allocator.hpp
==============================================================================
--- branches/release/boost/interprocess/allocators/node_allocator.hpp (original)
+++ branches/release/boost/interprocess/allocators/node_allocator.hpp 2011-12-26 12:21:36 EST (Mon, 26 Dec 2011)
@@ -1,6 +1,6 @@
 //////////////////////////////////////////////////////////////////////////////
 //
-// (C) Copyright Ion Gaztanaga 2005-2009. Distributed under the Boost
+// (C) Copyright Ion Gaztanaga 2005-2011. 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)
 //
@@ -93,7 +93,7 @@
    typedef typename segment_manager::difference_type difference_type;
 
    typedef boost::interprocess::version_type<node_allocator_base, Version> version;
- typedef boost::container::containers_detail::transform_multiallocation_chain
+ typedef boost::container::container_detail::transform_multiallocation_chain
       <typename SegmentManager::multiallocation_chain, T>multiallocation_chain;
 
    //!Obtains node_allocator_base from
@@ -127,7 +127,7 @@
    node_allocator_base(const node_allocator_base &other)
       : mp_node_pool(other.get_node_pool())
    {
- node_pool<0>::get(ipcdetail::get_pointer(mp_node_pool))->inc_ref_count();
+ node_pool<0>::get(ipcdetail::to_raw_pointer(mp_node_pool))->inc_ref_count();
    }
 
    //!Copy constructor from related node_allocator_base. If not present, constructs
@@ -149,17 +149,17 @@
    //!Destructor, removes node_pool_t from memory
    //!if its reference count reaches to zero. Never throws
    ~node_allocator_base()
- { ipcdetail::destroy_node_pool_if_last_link(node_pool<0>::get(ipcdetail::get_pointer(mp_node_pool))); }
+ { ipcdetail::destroy_node_pool_if_last_link(node_pool<0>::get(ipcdetail::to_raw_pointer(mp_node_pool))); }
 
    //!Returns a pointer to the node pool.
    //!Never throws
    void* get_node_pool() const
- { return ipcdetail::get_pointer(mp_node_pool); }
+ { return ipcdetail::to_raw_pointer(mp_node_pool); }
 
    //!Returns the segment manager.
    //!Never throws
    segment_manager* get_segment_manager()const
- { return node_pool<0>::get(ipcdetail::get_pointer(mp_node_pool))->get_segment_manager(); }
+ { return node_pool<0>::get(ipcdetail::to_raw_pointer(mp_node_pool))->get_segment_manager(); }
 
    //!Swaps allocators. Does not throw. If each allocator is placed in a
    //!different memory segment, the result is undefined.

Modified: branches/release/boost/interprocess/allocators/private_adaptive_pool.hpp
==============================================================================
--- branches/release/boost/interprocess/allocators/private_adaptive_pool.hpp (original)
+++ branches/release/boost/interprocess/allocators/private_adaptive_pool.hpp 2011-12-26 12:21:36 EST (Mon, 26 Dec 2011)
@@ -1,6 +1,6 @@
 //////////////////////////////////////////////////////////////////////////////
 //
-// (C) Copyright Ion Gaztanaga 2005-2009. Distributed under the Boost
+// (C) Copyright Ion Gaztanaga 2005-2011. 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,7 +94,7 @@
    typedef typename segment_manager::size_type difference_type;
    typedef boost::interprocess::version_type
       <private_adaptive_pool_base, Version> version;
- typedef boost::container::containers_detail::transform_multiallocation_chain
+ typedef boost::container::container_detail::transform_multiallocation_chain
       <typename SegmentManager::multiallocation_chain, T>multiallocation_chain;
 
    //!Obtains node_allocator from other node_allocator

Modified: branches/release/boost/interprocess/allocators/private_node_allocator.hpp
==============================================================================
--- branches/release/boost/interprocess/allocators/private_node_allocator.hpp (original)
+++ branches/release/boost/interprocess/allocators/private_node_allocator.hpp 2011-12-26 12:21:36 EST (Mon, 26 Dec 2011)
@@ -1,6 +1,6 @@
 //////////////////////////////////////////////////////////////////////////////
 //
-// (C) Copyright Ion Gaztanaga 2005-2009. Distributed under the Boost
+// (C) Copyright Ion Gaztanaga 2005-2011. 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)
 //
@@ -88,7 +88,7 @@
    typedef typename segment_manager::difference_type difference_type;
    typedef boost::interprocess::version_type
       <private_node_allocator_base, Version> version;
- typedef boost::container::containers_detail::transform_multiallocation_chain
+ typedef boost::container::container_detail::transform_multiallocation_chain
       <typename SegmentManager::multiallocation_chain, T>multiallocation_chain;
 
    //!Obtains node_allocator from other node_allocator

Modified: branches/release/boost/interprocess/anonymous_shared_memory.hpp
==============================================================================
--- branches/release/boost/interprocess/anonymous_shared_memory.hpp (original)
+++ branches/release/boost/interprocess/anonymous_shared_memory.hpp 2011-12-26 12:21:36 EST (Mon, 26 Dec 2011)
@@ -1,6 +1,6 @@
 //////////////////////////////////////////////////////////////////////////////
 //
-// (C) Copyright Ion Gaztanaga 2005-2009. Distributed under the Boost
+// (C) Copyright Ion Gaztanaga 2005-2011. 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)
 //
@@ -14,7 +14,7 @@
 #include <boost/interprocess/detail/config_begin.hpp>
 #include <boost/interprocess/detail/workaround.hpp>
 #include <boost/interprocess/creation_tags.hpp>
-#include <boost/interprocess/detail/move.hpp>
+#include <boost/move/move.hpp>
 #include <boost/interprocess/interprocess_fwd.hpp>
 #include <boost/interprocess/mapped_region.hpp>
 #include <cstddef>

Modified: branches/release/boost/interprocess/containers/allocation_type.hpp
==============================================================================
--- branches/release/boost/interprocess/containers/allocation_type.hpp (original)
+++ branches/release/boost/interprocess/containers/allocation_type.hpp 2011-12-26 12:21:36 EST (Mon, 26 Dec 2011)
@@ -1,6 +1,6 @@
 //////////////////////////////////////////////////////////////////////////////
 //
-// (C) Copyright Ion Gaztanaga 2008-2009. Distributed under the Boost
+// (C) Copyright Ion Gaztanaga 2008-2011. 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)
 //

Modified: branches/release/boost/interprocess/containers/deque.hpp
==============================================================================
--- branches/release/boost/interprocess/containers/deque.hpp (original)
+++ branches/release/boost/interprocess/containers/deque.hpp 2011-12-26 12:21:36 EST (Mon, 26 Dec 2011)
@@ -1,6 +1,6 @@
 //////////////////////////////////////////////////////////////////////////////
 //
-// (C) Copyright Ion Gaztanaga 2008-2009. Distributed under the Boost
+// (C) Copyright Ion Gaztanaga 2008-2011. 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)
 //

Modified: branches/release/boost/interprocess/containers/flat_map.hpp
==============================================================================
--- branches/release/boost/interprocess/containers/flat_map.hpp (original)
+++ branches/release/boost/interprocess/containers/flat_map.hpp 2011-12-26 12:21:36 EST (Mon, 26 Dec 2011)
@@ -1,6 +1,6 @@
 //////////////////////////////////////////////////////////////////////////////
 //
-// (C) Copyright Ion Gaztanaga 2008-2009. Distributed under the Boost
+// (C) Copyright Ion Gaztanaga 2008-2011. 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)
 //

Modified: branches/release/boost/interprocess/containers/flat_set.hpp
==============================================================================
--- branches/release/boost/interprocess/containers/flat_set.hpp (original)
+++ branches/release/boost/interprocess/containers/flat_set.hpp 2011-12-26 12:21:36 EST (Mon, 26 Dec 2011)
@@ -1,6 +1,6 @@
 //////////////////////////////////////////////////////////////////////////////
 //
-// (C) Copyright Ion Gaztanaga 2008-2009. Distributed under the Boost
+// (C) Copyright Ion Gaztanaga 2008-2011. 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)
 //

Modified: branches/release/boost/interprocess/containers/list.hpp
==============================================================================
--- branches/release/boost/interprocess/containers/list.hpp (original)
+++ branches/release/boost/interprocess/containers/list.hpp 2011-12-26 12:21:36 EST (Mon, 26 Dec 2011)
@@ -1,6 +1,6 @@
 //////////////////////////////////////////////////////////////////////////////
 //
-// (C) Copyright Ion Gaztanaga 2008-2009. Distributed under the Boost
+// (C) Copyright Ion Gaztanaga 2008-2011. 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)
 //

Modified: branches/release/boost/interprocess/containers/map.hpp
==============================================================================
--- branches/release/boost/interprocess/containers/map.hpp (original)
+++ branches/release/boost/interprocess/containers/map.hpp 2011-12-26 12:21:36 EST (Mon, 26 Dec 2011)
@@ -1,6 +1,6 @@
 //////////////////////////////////////////////////////////////////////////////
 //
-// (C) Copyright Ion Gaztanaga 2008-2009. Distributed under the Boost
+// (C) Copyright Ion Gaztanaga 2008-2011. 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)
 //

Modified: branches/release/boost/interprocess/containers/pair.hpp
==============================================================================
--- branches/release/boost/interprocess/containers/pair.hpp (original)
+++ branches/release/boost/interprocess/containers/pair.hpp 2011-12-26 12:21:36 EST (Mon, 26 Dec 2011)
@@ -1,6 +1,6 @@
 //////////////////////////////////////////////////////////////////////////////
 //
-// (C) Copyright Ion Gaztanaga 2008-2009. Distributed under the Boost
+// (C) Copyright Ion Gaztanaga 2008-2011. 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)
 //
@@ -22,8 +22,8 @@
 namespace boost {
 namespace interprocess {
 
-using boost::container::containers_detail::pair;
-using boost::container::containers_detail::piecewise_construct;
+using boost::container::container_detail::pair;
+using boost::container::container_detail::piecewise_construct;
 
 } //namespace interprocess {
 } //namespace boost {

Modified: branches/release/boost/interprocess/containers/set.hpp
==============================================================================
--- branches/release/boost/interprocess/containers/set.hpp (original)
+++ branches/release/boost/interprocess/containers/set.hpp 2011-12-26 12:21:36 EST (Mon, 26 Dec 2011)
@@ -1,6 +1,6 @@
 //////////////////////////////////////////////////////////////////////////////
 //
-// (C) Copyright Ion Gaztanaga 2008-2009. Distributed under the Boost
+// (C) Copyright Ion Gaztanaga 2008-2011. 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)
 //

Modified: branches/release/boost/interprocess/containers/slist.hpp
==============================================================================
--- branches/release/boost/interprocess/containers/slist.hpp (original)
+++ branches/release/boost/interprocess/containers/slist.hpp 2011-12-26 12:21:36 EST (Mon, 26 Dec 2011)
@@ -1,6 +1,6 @@
 //////////////////////////////////////////////////////////////////////////////
 //
-// (C) Copyright Ion Gaztanaga 2008-2009. Distributed under the Boost
+// (C) Copyright Ion Gaztanaga 2008-2011. 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)
 //

Modified: branches/release/boost/interprocess/containers/stable_vector.hpp
==============================================================================
--- branches/release/boost/interprocess/containers/stable_vector.hpp (original)
+++ branches/release/boost/interprocess/containers/stable_vector.hpp 2011-12-26 12:21:36 EST (Mon, 26 Dec 2011)
@@ -1,6 +1,6 @@
 //////////////////////////////////////////////////////////////////////////////
 //
-// (C) Copyright Ion Gaztanaga 2008-2009. Distributed under the Boost
+// (C) Copyright Ion Gaztanaga 2008-2011. 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)
 //

Modified: branches/release/boost/interprocess/containers/string.hpp
==============================================================================
--- branches/release/boost/interprocess/containers/string.hpp (original)
+++ branches/release/boost/interprocess/containers/string.hpp 2011-12-26 12:21:36 EST (Mon, 26 Dec 2011)
@@ -1,6 +1,6 @@
 //////////////////////////////////////////////////////////////////////////////
 //
-// (C) Copyright Ion Gaztanaga 2008-2009. Distributed under the Boost
+// (C) Copyright Ion Gaztanaga 2008-2011. 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)
 //

Modified: branches/release/boost/interprocess/containers/vector.hpp
==============================================================================
--- branches/release/boost/interprocess/containers/vector.hpp (original)
+++ branches/release/boost/interprocess/containers/vector.hpp 2011-12-26 12:21:36 EST (Mon, 26 Dec 2011)
@@ -1,6 +1,6 @@
 //////////////////////////////////////////////////////////////////////////////
 //
-// (C) Copyright Ion Gaztanaga 2008-2009. Distributed under the Boost
+// (C) Copyright Ion Gaztanaga 2008-2011. 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)
 //

Modified: branches/release/boost/interprocess/containers/version_type.hpp
==============================================================================
--- branches/release/boost/interprocess/containers/version_type.hpp (original)
+++ branches/release/boost/interprocess/containers/version_type.hpp 2011-12-26 12:21:36 EST (Mon, 26 Dec 2011)
@@ -1,6 +1,6 @@
 //////////////////////////////////////////////////////////////////////////////
 //
-// (C) Copyright Ion Gaztanaga 2008-2009. Distributed under the Boost
+// (C) Copyright Ion Gaztanaga 2008-2011. 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,8 +21,8 @@
 namespace boost {
 namespace interprocess {
 
-using boost::container::containers_detail::version_type;
-using boost::container::containers_detail::version;
+using boost::container::container_detail::version_type;
+using boost::container::container_detail::version;
 
 } //namespace interprocess {
 } //namespace boost {

Modified: branches/release/boost/interprocess/creation_tags.hpp
==============================================================================
--- branches/release/boost/interprocess/creation_tags.hpp (original)
+++ branches/release/boost/interprocess/creation_tags.hpp 2011-12-26 12:21:36 EST (Mon, 26 Dec 2011)
@@ -1,6 +1,6 @@
 //////////////////////////////////////////////////////////////////////////////
 //
-// (C) Copyright Ion Gaztanaga 2005-2009. Distributed under the Boost
+// (C) Copyright Ion Gaztanaga 2005-2011. 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)
 //

Modified: branches/release/boost/interprocess/detail/atomic.hpp
==============================================================================
--- branches/release/boost/interprocess/detail/atomic.hpp (original)
+++ branches/release/boost/interprocess/detail/atomic.hpp 2011-12-26 12:21:36 EST (Mon, 26 Dec 2011)
@@ -1,6 +1,6 @@
 //////////////////////////////////////////////////////////////////////////////
 //
-// (C) Copyright Ion Gaztanaga 2006-2009
+// (C) Copyright Ion Gaztanaga 2006-2011
 // (C) Copyright Markus Schoepflin 2007
 // (C) Copyright Bryce Lelbach 2010
 //

Modified: branches/release/boost/interprocess/detail/cast_tags.hpp
==============================================================================
--- branches/release/boost/interprocess/detail/cast_tags.hpp (original)
+++ branches/release/boost/interprocess/detail/cast_tags.hpp 2011-12-26 12:21:36 EST (Mon, 26 Dec 2011)
@@ -1,6 +1,6 @@
 //////////////////////////////////////////////////////////////////////////////
 //
-// (C) Copyright Ion Gaztanaga 2005-2009. Distributed under the Boost
+// (C) Copyright Ion Gaztanaga 2005-2011. 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)
 //

Modified: branches/release/boost/interprocess/detail/config_begin.hpp
==============================================================================
--- branches/release/boost/interprocess/detail/config_begin.hpp (original)
+++ branches/release/boost/interprocess/detail/config_begin.hpp 2011-12-26 12:21:36 EST (Mon, 26 Dec 2011)
@@ -1,6 +1,6 @@
 //////////////////////////////////////////////////////////////////////////////
 //
-// (C) Copyright Ion Gaztanaga 2005-2009. Distributed under the Boost
+// (C) Copyright Ion Gaztanaga 2005-2011. 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)
 //

Modified: branches/release/boost/interprocess/detail/config_end.hpp
==============================================================================
--- branches/release/boost/interprocess/detail/config_end.hpp (original)
+++ branches/release/boost/interprocess/detail/config_end.hpp 2011-12-26 12:21:36 EST (Mon, 26 Dec 2011)
@@ -1,6 +1,6 @@
 //////////////////////////////////////////////////////////////////////////////
 //
-// (C) Copyright Ion Gaztanaga 2005-2009. Distributed under the Boost
+// (C) Copyright Ion Gaztanaga 2005-2011. 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)
 //

Modified: branches/release/boost/interprocess/detail/file_wrapper.hpp
==============================================================================
--- branches/release/boost/interprocess/detail/file_wrapper.hpp (original)
+++ branches/release/boost/interprocess/detail/file_wrapper.hpp 2011-12-26 12:21:36 EST (Mon, 26 Dec 2011)
@@ -15,7 +15,7 @@
 #include <boost/interprocess/detail/workaround.hpp>
 #include <boost/interprocess/detail/os_file_functions.hpp>
 #include <boost/interprocess/creation_tags.hpp>
-#include <boost/interprocess/detail/move.hpp>
+#include <boost/move/move.hpp>
 #include <boost/interprocess/creation_tags.hpp>
 
 namespace boost {
@@ -61,7 +61,7 @@
    //!Does not throw
    file_wrapper &operator=(BOOST_RV_REF(file_wrapper) moved)
    {
- file_wrapper tmp(boost::interprocess::move(moved));
+ file_wrapper tmp(boost::move(moved));
       this->swap(tmp);
       return *this;
    }

Modified: branches/release/boost/interprocess/detail/in_place_interface.hpp
==============================================================================
--- branches/release/boost/interprocess/detail/in_place_interface.hpp (original)
+++ branches/release/boost/interprocess/detail/in_place_interface.hpp 2011-12-26 12:21:36 EST (Mon, 26 Dec 2011)
@@ -1,6 +1,6 @@
 //////////////////////////////////////////////////////////////////////////////
 //
-// (C) Copyright Ion Gaztanaga 2005-2009. Distributed under the Boost
+// (C) Copyright Ion Gaztanaga 2005-2011. 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)
 //

Modified: branches/release/boost/interprocess/detail/intermodule_singleton.hpp
==============================================================================
--- branches/release/boost/interprocess/detail/intermodule_singleton.hpp (original)
+++ branches/release/boost/interprocess/detail/intermodule_singleton.hpp 2011-12-26 12:21:36 EST (Mon, 26 Dec 2011)
@@ -1,6 +1,6 @@
 //////////////////////////////////////////////////////////////////////////////
 //
-// (C) Copyright Ion Gaztanaga 2009-2009. Distributed under the Boost
+// (C) Copyright Ion Gaztanaga 2009-2011. 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)
 //
@@ -18,10 +18,22 @@
 #include <boost/interprocess/detail/config_begin.hpp>
 #include <boost/interprocess/detail/workaround.hpp>
 
-#include <boost/interprocess/managed_shared_memory.hpp>
-#ifdef BOOST_INTERPROCESS_WINDOWS
-#include <boost/interprocess/managed_windows_shared_memory.hpp>
+#if defined(BOOST_INTERPROCESS_WINDOWS)
+#include <boost/interprocess/windows_shared_memory.hpp>
 #endif
+
+#include <boost/interprocess/shared_memory_object.hpp>
+
+#include <boost/interprocess/sync/spin/mutex.hpp>
+#include <boost/interprocess/sync/spin/recursive_mutex.hpp>
+#include <boost/interprocess/detail/managed_memory_impl.hpp>
+#include <boost/interprocess/detail/managed_open_or_create_impl.hpp>
+#include <boost/interprocess/mem_algo/rbtree_best_fit.hpp>
+#include <boost/interprocess/indexes/iset_index.hpp>
+#include <boost/interprocess/creation_tags.hpp>
+#include <boost/interprocess/permissions.hpp>
+
+
 #include <boost/interprocess/detail/atomic.hpp>
 #include <boost/interprocess/detail/os_thread_functions.hpp>
 #include <boost/interprocess/detail/tmp_dir_helpers.hpp>
@@ -38,7 +50,7 @@
 #include <sys/stat.h>
 #include <errno.h>
 
-#if defined (BOOST_INTERPROCESS_WINDOWS)
+#if defined(BOOST_INTERPROCESS_WINDOWS)
 #include <fcntl.h>
 #include <io.h>
 
@@ -53,6 +65,130 @@
 namespace interprocess{
 namespace ipcdetail{
 
+struct intermodule_singleton_mutex_family
+{
+ typedef boost::interprocess::ipcdetail::spin_mutex mutex_type;
+ typedef boost::interprocess::ipcdetail::spin_recursive_mutex recursive_mutex_type;
+};
+
+struct intermodule_types
+{
+ typedef rbtree_best_fit<intermodule_singleton_mutex_family, void*> mem_algo;
+ template<class Device, bool FileBased>
+ struct open_or_create
+ {
+ typedef managed_open_or_create_impl
+ <Device, mem_algo::Alignment, FileBased> type;
+ };
+};
+
+template<class Device, bool FileBased>
+class basic_managed_global_memory
+ : public basic_managed_memory_impl
+ < char
+ , intermodule_types::mem_algo
+ , iset_index
+ , intermodule_types::open_or_create<Device, FileBased>::type::ManagedOpenOrCreateUserOffset
+ >
+ , private intermodule_types::open_or_create<Device, FileBased>::type
+{
+ /// @cond
+ typedef typename intermodule_types::template open_or_create<Device, FileBased>::type base2_t;
+
+ typedef basic_managed_memory_impl
+ < char
+ , intermodule_types::mem_algo
+ , iset_index
+ , base2_t::ManagedOpenOrCreateUserOffset
+ > base_t;
+
+ typedef create_open_func<base_t> create_open_func_t;
+
+ basic_managed_global_memory *get_this_pointer()
+ { return this; }
+
+ public:
+ typedef typename base_t::size_type size_type;
+
+ private:
+ typedef typename base_t::char_ptr_holder_t char_ptr_holder_t;
+ BOOST_MOVABLE_BUT_NOT_COPYABLE(basic_managed_global_memory)
+ /// @endcond
+
+ public: //functions
+/*
+ basic_managed_global_memory()
+ {}
+
+ basic_managed_global_memory(create_only_t create_only, const char *name,
+ size_type size, const void *addr = 0, const permissions& perm = permissions())
+ : base_t()
+ , base2_t(create_only, name, size, read_write, addr,
+ create_open_func_t(get_this_pointer(), DoCreate), perm)
+ {}
+*/
+ basic_managed_global_memory (open_or_create_t open_or_create,
+ const char *name, size_type size,
+ const void *addr = 0, const permissions& perm = permissions())
+ : base_t()
+ , base2_t(open_or_create, name, size, read_write, addr,
+ create_open_func_t(get_this_pointer(),
+ DoOpenOrCreate), perm)
+ {}
+
+ basic_managed_global_memory (open_only_t open_only, const char* name,
+ const void *addr = 0)
+ : base_t()
+ , base2_t(open_only, name, read_write, addr,
+ create_open_func_t(get_this_pointer(),
+ DoOpen))
+ {}
+
+/*
+ basic_managed_global_memory (open_copy_on_write_t, const char* name,
+ const void *addr = 0)
+ : base_t()
+ , base2_t(open_only, name, copy_on_write, addr,
+ create_open_func_t(get_this_pointer(),
+ DoOpen))
+ {}
+
+ //!Connects to a created shared memory and its segment manager.
+ //!in read-only mode.
+ //!This can throw.
+ basic_managed_global_memory (open_read_only_t, const char* name,
+ const void *addr = 0)
+ : base_t()
+ , base2_t(open_only, name, read_only, addr,
+ create_open_func_t(get_this_pointer(),
+ DoOpen))
+ {}
+
+ //!Moves the ownership of "moved"'s managed memory to *this.
+ //!Does not throw
+ basic_managed_global_memory(BOOST_RV_REF(basic_managed_global_memory) moved)
+ {
+ basic_managed_global_memory tmp;
+ this->swap(moved);
+ tmp.swap(moved);
+ }
+
+ //!Moves the ownership of "moved"'s managed memory to *this.
+ //!Does not throw
+ basic_managed_global_memory &operator=(BOOST_RV_REF(basic_managed_global_memory) moved)
+ {
+ basic_managed_global_memory tmp(boost::move(moved));
+ this->swap(tmp);
+ return *this;
+ }*/
+};
+
+#if defined(BOOST_INTERPROCESS_WINDOWS)
+typedef basic_managed_global_memory<windows_shared_memory, false> windows_managed_global_memory;
+#endif
+
+typedef basic_managed_global_memory<shared_memory_object, true> managed_global_memory;
+
 namespace file_locking_helpers {
 
 inline void get_pid_creation_time_str(std::string &s)
@@ -172,10 +308,10 @@
    }
 };
 
-#if (defined BOOST_INTERPROCESS_WINDOWS)
+#if defined(BOOST_INTERPROCESS_WINDOWS)
 
 template<>
-struct managed_sh_dependant<managed_windows_shared_memory>
+struct managed_sh_dependant<windows_managed_global_memory>
 {
    static void apply_gmem_erase_logic(const char *, const char *){}
 
@@ -581,12 +717,12 @@
    bool retry_with_new_shm;
 };
 
-#if defined (BOOST_INTERPROCESS_WINDOWS)
+#if defined(BOOST_INTERPROCESS_WINDOWS)
 
 template<>
-struct lock_file_logic<managed_windows_shared_memory>
+struct lock_file_logic<windows_managed_global_memory>
 {
- lock_file_logic(managed_windows_shared_memory &)
+ lock_file_logic(windows_managed_global_memory &)
       : retry_with_new_shm(false)
    {}
 
@@ -634,10 +770,10 @@
    private:
    static ManagedShMem &get_shm()
    {
- return *static_cast<ManagedShMem *>(static_cast<void *>(&shm_mem));
+ return *static_cast<ManagedShMem *>(static_cast<void *>(&mem_holder.shm_mem));
    }
 
- enum { MemSize = ((sizeof(ManagedShMem)-1)/sizeof(::boost::detail::max_align))+1u };
+ static const std::size_t MemSize = ((sizeof(ManagedShMem)-1)/sizeof(::boost::detail::max_align))+1u;
 
    static void initialize_shm();
    static void destroy_shm();
@@ -646,7 +782,10 @@
    static volatile boost::uint32_t this_module_singleton_count;
    //this_module_shm_initialized is the state of this module's shm class object
    static volatile boost::uint32_t this_module_shm_initialized;
- static ::boost::detail::max_align shm_mem[MemSize];
+ static struct mem_holder_t
+ {
+ ::boost::detail::max_align shm_mem[MemSize];
+ } mem_holder;
 };
 
 template<class ManagedShMem>
@@ -656,7 +795,11 @@
 volatile boost::uint32_t intermodule_singleton_common<ManagedShMem>::this_module_shm_initialized;
 
 template<class ManagedShMem>
-::boost::detail::max_align intermodule_singleton_common<ManagedShMem>::shm_mem[intermodule_singleton_common<ManagedShMem>::MemSize];
+const std::size_t intermodule_singleton_common<ManagedShMem>::MemSize;
+
+template<class ManagedShMem>
+typename intermodule_singleton_common<ManagedShMem>::mem_holder_t
+ intermodule_singleton_common<ManagedShMem>::mem_holder;
 
 template<class ManagedShMem>
 void intermodule_singleton_common<ManagedShMem>::initialize_shm()
@@ -734,12 +877,12 @@
    ManagedShMem &mshm_;
 };
 
-#if defined (BOOST_INTERPROCESS_WINDOWS)
+#if defined(BOOST_INTERPROCESS_WINDOWS)
 
 template<>
-struct unlink_shmlogic<managed_windows_shared_memory>
+struct unlink_shmlogic<windows_managed_global_memory>
 {
- unlink_shmlogic(managed_windows_shared_memory &)
+ unlink_shmlogic(windows_managed_global_memory &)
    {}
    void operator()(){}
 };
@@ -823,7 +966,7 @@
                break;
             }
             else if(previous_module_singleton_initialized == Initializing){
- ipcdetail::thread_yield();
+ thread_yield();
             }
             else{
                //This can't be happening!
@@ -985,14 +1128,14 @@
 };
 
 template <typename C, bool L, class ManagedShMem>
-volatile int intermodule_singleton_impl<C, L, ManagedShMem>::lifetime_type_lazy::m_dummy;
+volatile int intermodule_singleton_impl<C, L, ManagedShMem>::lifetime_type_lazy::m_dummy = 0;
 
 //These will be zero-initialized by the loader
 template <typename C, bool L, class ManagedShMem>
-void *intermodule_singleton_impl<C, L, ManagedShMem>::this_module_singleton_ptr;
+void *intermodule_singleton_impl<C, L, ManagedShMem>::this_module_singleton_ptr = 0;
 
 template <typename C, bool L, class ManagedShMem>
-volatile boost::uint32_t intermodule_singleton_impl<C, L, ManagedShMem>::this_module_singleton_initialized;
+volatile boost::uint32_t intermodule_singleton_impl<C, L, ManagedShMem>::this_module_singleton_initialized = 0;
 
 template <typename C, bool L, class ManagedShMem>
 typename intermodule_singleton_impl<C, L, ManagedShMem>::lifetime_type
@@ -1000,14 +1143,18 @@
 
 template<typename C, bool LazyInit = false>
 class portable_intermodule_singleton
- : public intermodule_singleton_impl<C, LazyInit, managed_shared_memory>
+ : public intermodule_singleton_impl<C, LazyInit, managed_global_memory>
 {};
 
-#ifdef BOOST_INTERPROCESS_WINDOWS
+#if defined(BOOST_INTERPROCESS_WINDOWS)
 
 template<typename C, bool LazyInit = false>
 class windows_intermodule_singleton
- : public intermodule_singleton_impl<C, LazyInit, managed_windows_shared_memory>
+ : public intermodule_singleton_impl
+ < C
+ , LazyInit
+ , windows_managed_global_memory
+ >
 {};
 
 #endif
@@ -1019,7 +1166,6 @@
 class intermodule_singleton
    #ifdef BOOST_INTERPROCESS_WINDOWS
    : public windows_intermodule_singleton<C, LazyInit>
-// : public portable_intermodule_singleton<C, LazyInit>
    #else
    : public portable_intermodule_singleton<C, LazyInit>
    #endif

Modified: branches/release/boost/interprocess/detail/interprocess_tester.hpp
==============================================================================
--- branches/release/boost/interprocess/detail/interprocess_tester.hpp (original)
+++ branches/release/boost/interprocess/detail/interprocess_tester.hpp 2011-12-26 12:21:36 EST (Mon, 26 Dec 2011)
@@ -1,6 +1,6 @@
 //////////////////////////////////////////////////////////////////////////////
 //
-// (C) Copyright Ion Gaztanaga 2007-2009. Distributed under the Boost
+// (C) Copyright Ion Gaztanaga 2007-2011. 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)
 //

Modified: branches/release/boost/interprocess/detail/intersegment_ptr.hpp
==============================================================================
--- branches/release/boost/interprocess/detail/intersegment_ptr.hpp (original)
+++ branches/release/boost/interprocess/detail/intersegment_ptr.hpp 2011-12-26 12:21:36 EST (Mon, 26 Dec 2011)
@@ -1,6 +1,6 @@
 //////////////////////////////////////////////////////////////////////////////
 //
-// (C) Copyright Ion Gaztanaga 2005-2009. Distributed under the Boost
+// (C) Copyright Ion Gaztanaga 2005-2011. 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)
 //
@@ -226,7 +226,7 @@
 
    //!Obtains the address pointed
    //!by the object
- void *get_pointer() const
+ void *to_raw_pointer() const
    {
       if(is_null()){
          return 0;
@@ -259,23 +259,23 @@
    //!This only works with two basic_intersegment_ptr pointing
    //!to the same segment. Otherwise undefined
    std::ptrdiff_t diff(const self_t &other) const
- { return static_cast<char*>(this->get_pointer()) - static_cast<char*>(other.get_pointer()); }
+ { return static_cast<char*>(this->to_raw_pointer()) - static_cast<char*>(other.to_raw_pointer()); }
 
    //!Returns true if both point to
    //!the same object
    bool equal(const self_t &y) const
- { return this->get_pointer() == y.get_pointer(); }
+ { return this->to_raw_pointer() == y.to_raw_pointer(); }
 
    //!Returns true if *this is less than other.
    //!This only works with two basic_intersegment_ptr pointing
    //!to the same segment group. Otherwise undefined. Never throws
    bool less(const self_t &y) const
- { return this->get_pointer() < y.get_pointer(); }
+ { return this->to_raw_pointer() < y.to_raw_pointer(); }
 
    void swap(self_t &other)
    {
- void *ptr_this = this->get_pointer();
- void *ptr_other = other.get_pointer();
+ void *ptr_this = this->to_raw_pointer();
+ void *ptr_other = other.to_raw_pointer();
       other.set_from_pointer(ptr_this);
       this->set_from_pointer(ptr_other);
    }
@@ -344,21 +344,21 @@
    //!by another flat_map_intersegment
    void set_from_other(const self_t &other)
    {
- this->set_from_pointer(other.get_pointer());
+ this->set_from_pointer(other.to_raw_pointer());
    }
 
    //!Increments internal
    //!offset
    void inc_offset(std::ptrdiff_t bytes)
    {
- this->set_from_pointer(static_cast<char*>(this->get_pointer()) + bytes);
+ this->set_from_pointer(static_cast<char*>(this->to_raw_pointer()) + bytes);
    }
 
    //!Decrements internal
    //!offset
    void dec_offset(std::ptrdiff_t bytes)
    {
- this->set_from_pointer(static_cast<char*>(this->get_pointer()) - bytes);
+ this->set_from_pointer(static_cast<char*>(this->to_raw_pointer()) - bytes);
    }
 
    //////////////////////////////////////
@@ -659,7 +659,7 @@
    //!Obtains raw pointer from offset.
    //!Never throws.
    pointer get()const
- { return static_cast<pointer>(base_t::get_pointer()); }
+ { return static_cast<pointer>(base_t::to_raw_pointer()); }
 
    //!Pointer-like -> operator. It can return 0 pointer.
    //!Never throws.
@@ -865,10 +865,10 @@
            boost::interprocess::intersegment_ptr<T> &pt2)
 { pt.swap(pt2); }
 
-//!get_pointer() enables boost::mem_fn to recognize intersegment_ptr.
+//!to_raw_pointer() enables boost::mem_fn to recognize intersegment_ptr.
 //!Never throws.
 template<class T> inline
-T * get_pointer(boost::interprocess::intersegment_ptr<T> const & p)
+T * to_raw_pointer(boost::interprocess::intersegment_ptr<T> const & p)
 { return p.get(); }
 
 //!Simulation of static_cast between pointers.
@@ -907,10 +907,10 @@
 } //namespace interprocess {
 
 #if defined(_MSC_VER) && (_MSC_VER < 1400)
-//!get_pointer() enables boost::mem_fn to recognize intersegment_ptr.
+//!to_raw_pointer() enables boost::mem_fn to recognize intersegment_ptr.
 //!Never throws.
 template<class T> inline
-T * get_pointer(boost::interprocess::intersegment_ptr<T> const & p)
+T * to_raw_pointer(boost::interprocess::intersegment_ptr<T> const & p)
 { return p.get(); }
 #endif
 
@@ -930,8 +930,6 @@
 
 } //namespace boost {
 
-#include <boost/interprocess/detail/config_end.hpp>
-
 #if 0
 
 //bits
@@ -982,7 +980,7 @@
 
 //!Obtains the address pointed by the
 //!object
-void *get_pointer() const
+void *to_raw_pointer() const
 {
    if(this->is_pointee_outside() || this->is_in_stack()){
       return raw_address();
@@ -1033,7 +1031,7 @@
 }
 
 void set_from_other(const self_t &other)
-{ this->set_from_pointer(other.get_pointer()); }
+{ this->set_from_pointer(other.to_raw_pointer()); }
 
 #endif
 

Modified: branches/release/boost/interprocess/detail/managed_memory_impl.hpp
==============================================================================
--- branches/release/boost/interprocess/detail/managed_memory_impl.hpp (original)
+++ branches/release/boost/interprocess/detail/managed_memory_impl.hpp 2011-12-26 12:21:36 EST (Mon, 26 Dec 2011)
@@ -1,6 +1,6 @@
 //////////////////////////////////////////////////////////////////////////////
 //
-// (C) Copyright Ion Gaztanaga 2005-2009. Distributed under the Boost
+// (C) Copyright Ion Gaztanaga 2005-2011. 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)
 //
@@ -19,14 +19,10 @@
 #include <boost/interprocess/detail/workaround.hpp>
 
 #include <boost/interprocess/interprocess_fwd.hpp>
-#include <boost/interprocess/mem_algo/rbtree_best_fit.hpp>
-#include <boost/interprocess/sync/mutex_family.hpp>
 #include <boost/interprocess/detail/utilities.hpp>
 #include <boost/interprocess/detail/os_file_functions.hpp>
 #include <boost/interprocess/creation_tags.hpp>
-#include <boost/interprocess/sync/interprocess_mutex.hpp>
 #include <boost/interprocess/exceptions.hpp>
-#include <boost/interprocess/offset_ptr.hpp>
 #include <boost/interprocess/segment_manager.hpp>
 #include <boost/interprocess/sync/scoped_lock.hpp>
 //
@@ -137,10 +133,10 @@
    static bool shrink_to_fit(const char *filename)
    {
       typedef typename ManagedMemory::device_type device_type;
- size_type new_size, old_size;
+ size_type new_size;
       try{
          ManagedMemory managed_memory(open_only, filename);
- old_size = managed_memory.get_size();
+ managed_memory.get_size();
          managed_memory.self_t::shrink_to_fit();
          new_size = managed_memory.get_size();
       }
@@ -329,7 +325,7 @@
 
    //!Allocates n_elements, each one of elem_sizes[i] bytes.
    void deallocate_many(multiallocation_chain chain)
- { return mp_header->deallocate_many(boost::interprocess::move(chain)); }
+ { return mp_header->deallocate_many(boost::move(chain)); }
 
    /// @endcond
 
@@ -583,7 +579,7 @@
    //!For all theses reasons, classes with throwing destructors are not
    //!recommended for memory.
    template <class T>
- bool destroy(const ipcdetail::unique_instance_t *const )
+ bool destroy(const unique_instance_t *const )
    { return mp_header->template destroy<T>(unique_instance); }
 
    //!Destroys the object (named, unique, or anonymous)
@@ -724,13 +720,13 @@
 class create_open_func
 {
    public:
- create_open_func(BasicManagedMemoryImpl * const frontend, ipcdetail::create_enum_t type)
+ create_open_func(BasicManagedMemoryImpl * const frontend, create_enum_t type)
       : m_frontend(frontend), m_type(type){}
 
    bool operator()(void *addr, typename BasicManagedMemoryImpl::size_type size, bool created) const
    {
- if(((m_type == ipcdetail::DoOpen) && created) ||
- ((m_type == ipcdetail::DoCreate) && !created))
+ if(((m_type == DoOpen) && created) ||
+ ((m_type == DoCreate) && !created))
          return false;
 
       if(created)
@@ -741,7 +737,7 @@
 
    private:
    BasicManagedMemoryImpl *m_frontend;
- ipcdetail::create_enum_t m_type;
+ create_enum_t m_type;
 };
 
 } //namespace ipcdetail {

Modified: branches/release/boost/interprocess/detail/managed_multi_shared_memory.hpp
==============================================================================
--- branches/release/boost/interprocess/detail/managed_multi_shared_memory.hpp (original)
+++ branches/release/boost/interprocess/detail/managed_multi_shared_memory.hpp 2011-12-26 12:21:36 EST (Mon, 26 Dec 2011)
@@ -1,6 +1,6 @@
 //////////////////////////////////////////////////////////////////////////////
 //
-// (C) Copyright Ion Gaztanaga 2005-2009. Distributed under the Boost
+// (C) Copyright Ion Gaztanaga 2005-2011. 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)
 //
@@ -34,6 +34,10 @@
 #include <boost/interprocess/streams/vectorstream.hpp>
 #include <memory>
 #include <boost/assert.hpp>
+//These includes needed to fulfill default template parameters of
+//predeclarations in interprocess_fwd.hpp
+#include <boost/interprocess/mem_algo/rbtree_best_fit.hpp>
+#include <boost/interprocess/sync/mutex_family.hpp>
 
 //!\file
 //!Describes a named shared memory object allocation user class.
@@ -68,7 +72,7 @@
    
    typedef typename MemoryAlgorithm::void_pointer void_pointer;
    typedef typename ipcdetail::
- managed_open_or_create_impl<shared_memory_object> managed_impl;
+ managed_open_or_create_impl<shared_memory_object, MemoryAlgorithm::Alignment> managed_impl;
    typedef typename void_pointer::segment_group_id segment_group_id;
    typedef typename base_t::size_type size_type;
 
@@ -116,7 +120,8 @@
          : mp_frontend(frontend), m_group(0), m_min_segment_size(0){}
 
       virtual std::pair<void *, size_type> create_new_segment(size_type alloc_size)
- {
+ { (void)alloc_size;
+ /*
          //We should allocate an extra byte so that the
          //[base_addr + alloc_size] byte belongs to this segment
          alloc_size += 1;
@@ -126,9 +131,9 @@
                        m_min_segment_size : alloc_size;
          if(mp_frontend->priv_new_segment(create_open_func::DoCreate,
                                           alloc_size, 0, permissions())){
- shmem_list_t::value_type &m_impl = *mp_frontend->m_shmem_list.rbegin();
+ typename shmem_list_t::value_type &m_impl = *mp_frontend->m_shmem_list.rbegin();
             return result_type(m_impl.get_real_address(), m_impl.get_real_size()-1);
- }
+ }*/
          return result_type(static_cast<void *>(0), 0);
       }
 
@@ -153,7 +158,7 @@
 
       frontend_t * const mp_frontend;
       segment_group_id m_group;
- size_type m_min_segment_size;
+ size_type m_min_segment_size;
    };
 
    //!Functor to execute atomically when opening or creating a shared memory
@@ -328,21 +333,21 @@
             case create_open_func::DoCreate:
             {
                managed_impl shm(create_only, name, size, read_write, addr, func, perm);
- mshm = boost::interprocess::move(shm);
+ mshm = boost::move(shm);
             }
             break;
 
             case create_open_func::DoOpen:
             {
                managed_impl shm(open_only, name,read_write, addr, func);
- mshm = boost::interprocess::move(shm);
+ mshm = boost::move(shm);
             }
             break;
 
             case create_open_func::DoOpenOrCreate:
             {
                managed_impl shm(open_or_create, name, size, read_write, addr, func, perm);
- mshm = boost::interprocess::move(shm);
+ mshm = boost::move(shm);
             }
             break;
 
@@ -352,7 +357,7 @@
          }
 
          //This can throw.
- m_shmem_list.push_back(boost::interprocess::move(mshm));
+ m_shmem_list.push_back(boost::move(mshm));
          return true;
       }
       BOOST_CATCH(const std::bad_alloc&){
@@ -369,12 +374,13 @@
          //Obtain group identifier
          segment_group_id group = m_group_services.get_group();
          //Erase main segment and its resources
- shmem_list_t::iterator itbeg = m_shmem_list.begin(),
- itend = m_shmem_list.end(),
- it = itbeg;
+ //typename shmem_list_t::iterator itbeg = m_shmem_list.begin(),
+ // itend = m_shmem_list.end(),
+ // it = itbeg;
          //(*itbeg)->close_with_func(close_func(this));
          //Delete group. All mappings are erased too.
          ret = void_pointer::delete_group(group);
+ (void)ret;
          BOOST_ASSERT(ret);
          m_shmem_list.clear();
       }

Modified: branches/release/boost/interprocess/detail/managed_open_or_create_impl.hpp
==============================================================================
--- branches/release/boost/interprocess/detail/managed_open_or_create_impl.hpp (original)
+++ branches/release/boost/interprocess/detail/managed_open_or_create_impl.hpp 2011-12-26 12:21:36 EST (Mon, 26 Dec 2011)
@@ -22,10 +22,10 @@
 #include <boost/interprocess/detail/interprocess_tester.hpp>
 #include <boost/interprocess/creation_tags.hpp>
 #include <boost/interprocess/detail/mpl.hpp>
-#include <boost/interprocess/detail/move.hpp>
 #include <boost/interprocess/permissions.hpp>
 #include <boost/type_traits/alignment_of.hpp>
 #include <boost/type_traits/type_with_alignment.hpp>
+#include <boost/move/move.hpp>
 #include <boost/cstdint.hpp>
 
 namespace boost {
@@ -84,7 +84,7 @@
    DeviceAbstraction dev;
 };
 
-template<class DeviceAbstraction, bool FileBased = true, bool StoreDevice = true>
+template<class DeviceAbstraction, std::size_t MemAlignment = 0, bool FileBased = true, bool StoreDevice = true>
 class managed_open_or_create_impl
    : public managed_open_or_create_impl_device_holder<StoreDevice, DeviceAbstraction>
 {
@@ -104,9 +104,11 @@
    public:
    static const std::size_t
       ManagedOpenOrCreateUserOffset =
- ipcdetail::ct_rounded_size
+ ct_rounded_size
             < sizeof(boost::uint32_t)
- , ::boost::alignment_of< ::boost::detail::max_align >::value >::value;
+ , MemAlignment ? (MemAlignment) :
+ (::boost::alignment_of< ::boost::detail::max_align >::value)
+ >::value;
 
    managed_open_or_create_impl()
    {}
@@ -119,7 +121,7 @@
                  const permissions &perm)
    {
       priv_open_or_create
- ( ipcdetail::DoCreate
+ ( DoCreate
          , id
          , size
          , mode
@@ -134,7 +136,7 @@
                  const void *addr)
    {
       priv_open_or_create
- ( ipcdetail::DoOpen
+ ( DoOpen
          , id
          , 0
          , mode
@@ -152,7 +154,7 @@
                  const permissions &perm)
    {
       priv_open_or_create
- ( ipcdetail::DoOpenOrCreate
+ ( DoOpenOrCreate
          , id
          , size
          , mode
@@ -171,7 +173,7 @@
                  const permissions &perm)
    {
       priv_open_or_create
- (ipcdetail::DoCreate
+ (DoCreate
          , id
          , size
          , mode
@@ -188,7 +190,7 @@
                  const ConstructFunc &construct_func)
    {
       priv_open_or_create
- ( ipcdetail::DoOpen
+ ( DoOpen
          , id
          , 0
          , mode
@@ -207,7 +209,7 @@
                  const permissions &perm)
    {
       priv_open_or_create
- ( ipcdetail::DoOpenOrCreate
+ ( DoOpenOrCreate
          , id
          , size
          , mode
@@ -221,7 +223,7 @@
 
    managed_open_or_create_impl &operator=(BOOST_RV_REF(managed_open_or_create_impl) moved)
    {
- managed_open_or_create_impl tmp(boost::interprocess::move(moved));
+ managed_open_or_create_impl tmp(boost::move(moved));
       this->swap(tmp);
       return *this;
    }
@@ -263,47 +265,49 @@
 
    //These are templatized to allow explicit instantiations
    template<bool dummy>
- static void truncate_device(DeviceAbstraction &, offset_t, ipcdetail::false_)
+ static void truncate_device(DeviceAbstraction &, offset_t, false_)
    {} //Empty
 
    template<bool dummy>
- static void truncate_device(DeviceAbstraction &dev, offset_t size, ipcdetail::true_)
+ static void truncate_device(DeviceAbstraction &dev, offset_t size, true_)
    { dev.truncate(size); }
 
 
    template<bool dummy>
- static bool check_offset_t_size(std::size_t , ipcdetail::false_)
+ static bool check_offset_t_size(std::size_t , false_)
    { return true; } //Empty
 
    template<bool dummy>
- static bool check_offset_t_size(std::size_t size, ipcdetail::true_)
+ static bool check_offset_t_size(std::size_t size, true_)
    { return size == std::size_t(offset_t(size)); }
 
    //These are templatized to allow explicit instantiations
    template<bool dummy>
- static void create_device(DeviceAbstraction &dev, const device_id_t & id, std::size_t size, const permissions &perm, ipcdetail::false_)
+ static void create_device(DeviceAbstraction &dev, const device_id_t & id, std::size_t size, const permissions &perm, false_ file_like)
    {
+ (void)file_like;
       DeviceAbstraction tmp(create_only, id, read_write, size, perm);
       tmp.swap(dev);
    }
 
    template<bool dummy>
- static void create_device(DeviceAbstraction &dev, const device_id_t & id, std::size_t, const permissions &perm, ipcdetail::true_)
+ static void create_device(DeviceAbstraction &dev, const device_id_t & id, std::size_t, const permissions &perm, true_ file_like)
    {
+ (void)file_like;
       DeviceAbstraction tmp(create_only, id, read_write, perm);
       tmp.swap(dev);
    }
 
    template <class ConstructFunc> inline
    void priv_open_or_create
- (ipcdetail::create_enum_t type,
+ (create_enum_t type,
        const device_id_t & id,
        std::size_t size,
        mode_t mode, const void *addr,
        const permissions &perm,
        ConstructFunc construct_func)
    {
- typedef ipcdetail::bool_<FileBased> file_like_t;
+ typedef bool_<FileBased> file_like_t;
       (void)mode;
       error_info err;
       bool created = false;
@@ -311,35 +315,35 @@
       bool cow = false;
       DeviceAbstraction dev;
 
- if(type != ipcdetail::DoOpen && size < ManagedOpenOrCreateUserOffset){
+ if(type != DoOpen && size < ManagedOpenOrCreateUserOffset){
          throw interprocess_exception(error_info(size_error));
       }
       //Check size can be represented by offset_t (used by truncate)
- if(type != ipcdetail::DoOpen && !check_offset_t_size<FileBased>(size, file_like_t())){
+ if(type != DoOpen && !check_offset_t_size<FileBased>(size, file_like_t())){
          throw interprocess_exception(error_info(size_error));
       }
- if(type == ipcdetail::DoOpen && mode == read_write){
+ if(type == DoOpen && mode == read_write){
          DeviceAbstraction tmp(open_only, id, read_write);
          tmp.swap(dev);
          created = false;
       }
- else if(type == ipcdetail::DoOpen && mode == read_only){
+ else if(type == DoOpen && mode == read_only){
          DeviceAbstraction tmp(open_only, id, read_only);
          tmp.swap(dev);
          created = false;
          ronly = true;
       }
- else if(type == ipcdetail::DoOpen && mode == copy_on_write){
+ else if(type == DoOpen && mode == copy_on_write){
          DeviceAbstraction tmp(open_only, id, read_only);
          tmp.swap(dev);
          created = false;
          cow = true;
       }
- else if(type == ipcdetail::DoCreate){
+ else if(type == DoCreate){
          create_device<FileBased>(dev, id, size, perm, file_like_t());
          created = true;
       }
- else if(type == ipcdetail::DoOpenOrCreate){
+ else if(type == DoOpenOrCreate){
          //This loop is very ugly, but brute force is sometimes better
          //than diplomacy. If someone knows how to open or create a
          //file and know if we have really created it or just open it
@@ -367,9 +371,15 @@
                         throw;
                      }
                   }
+ catch(...){
+ throw;
+ }
                }
             }
- ipcdetail::thread_yield();
+ catch(...){
+ throw;
+ }
+ thread_yield();
          }
       }
 
@@ -382,7 +392,7 @@
             mapped_region region(dev, read_write, 0, 0, addr);
             boost::uint32_t *patomic_word = 0; //avoid gcc warning
             patomic_word = static_cast<boost::uint32_t*>(region.get_address());
- boost::uint32_t previous = ipcdetail::atomic_cas32(patomic_word, InitializingSegment, UninitializedSegment);
+ boost::uint32_t previous = atomic_cas32(patomic_word, InitializingSegment, UninitializedSegment);
 
             if(previous == UninitializedSegment){
                try{
@@ -391,10 +401,10 @@
                   m_mapped_region.swap(region);
                }
                catch(...){
- ipcdetail::atomic_write32(patomic_word, CorruptedSegment);
+ atomic_write32(patomic_word, CorruptedSegment);
                   throw;
                }
- ipcdetail::atomic_write32(patomic_word, InitializedSegment);
+ atomic_write32(patomic_word, InitializedSegment);
             }
             else if(previous == InitializingSegment || previous == InitializedSegment){
                throw interprocess_exception(error_info(already_exists_error));
@@ -416,10 +426,10 @@
          if(FileBased){
             offset_t filesize = 0;
             while(filesize == 0){
- if(!ipcdetail::get_file_size(ipcdetail::file_handle_from_mapping_handle(dev.get_mapping_handle()), filesize)){
+ if(!get_file_size(file_handle_from_mapping_handle(dev.get_mapping_handle()), filesize)){
                   throw interprocess_exception(error_info(system_error_code()));
                }
- ipcdetail::thread_yield();
+ thread_yield();
             }
             if(filesize == 1){
                throw interprocess_exception(error_info(corrupted_error));
@@ -429,11 +439,11 @@
          mapped_region region(dev, ronly ? read_only : (cow ? copy_on_write : read_write), 0, 0, addr);
 
          boost::uint32_t *patomic_word = static_cast<boost::uint32_t*>(region.get_address());
- boost::uint32_t value = ipcdetail::atomic_read32(patomic_word);
+ boost::uint32_t value = atomic_read32(patomic_word);
 
          while(value == InitializingSegment || value == UninitializedSegment){
- ipcdetail::thread_yield();
- value = ipcdetail::atomic_read32(patomic_word);
+ thread_yield();
+ value = atomic_read32(patomic_word);
          }
 
          if(value != InitializedSegment)
@@ -446,14 +456,14 @@
          m_mapped_region.swap(region);
       }
       if(StoreDevice){
- this->DevHolder::get_device() = boost::interprocess::move(dev);
+ this->DevHolder::get_device() = boost::move(dev);
       }
    }
 
    private:
- friend class ipcdetail::interprocess_tester;
+ friend class interprocess_tester;
    void dont_close_on_destruction()
- { ipcdetail::interprocess_tester::dont_close_on_destruction(m_mapped_region); }
+ { interprocess_tester::dont_close_on_destruction(m_mapped_region); }
 
    mapped_region m_mapped_region;
 };

Modified: branches/release/boost/interprocess/detail/math_functions.hpp
==============================================================================
--- branches/release/boost/interprocess/detail/math_functions.hpp (original)
+++ branches/release/boost/interprocess/detail/math_functions.hpp 2011-12-26 12:21:36 EST (Mon, 26 Dec 2011)
@@ -1,7 +1,7 @@
 //////////////////////////////////////////////////////////////////////////////
 //
 // (C) Copyright Stephen Cleary 2000.
-// (C) Copyright Ion Gaztanaga 2007-2009.
+// (C) Copyright Ion Gaztanaga 2007-2011.
 //
 // Distributed under the Boost Software License, Version 1.0.
 // (See accompanying file LICENSE_1_0.txt or copy at

Modified: branches/release/boost/interprocess/detail/min_max.hpp
==============================================================================
--- branches/release/boost/interprocess/detail/min_max.hpp (original)
+++ branches/release/boost/interprocess/detail/min_max.hpp 2011-12-26 12:21:36 EST (Mon, 26 Dec 2011)
@@ -1,6 +1,6 @@
 //////////////////////////////////////////////////////////////////////////////
 //
-// (C) Copyright Ion Gaztanaga 2005-2009.
+// (C) Copyright Ion Gaztanaga 2005-2011.
 //
 // Distributed under the Boost Software License, Version 1.0.
 // (See accompanying file LICENSE_1_0.txt or copy at

Modified: branches/release/boost/interprocess/detail/mpl.hpp
==============================================================================
--- branches/release/boost/interprocess/detail/mpl.hpp (original)
+++ branches/release/boost/interprocess/detail/mpl.hpp 2011-12-26 12:21:36 EST (Mon, 26 Dec 2011)
@@ -1,6 +1,6 @@
 //////////////////////////////////////////////////////////////////////////////
 //
-// (C) Copyright Ion Gaztanaga 2005-2009.
+// (C) Copyright Ion Gaztanaga 2005-2011.
 //
 // Distributed under the Boost Software License, Version 1.0.
 // (See accompanying file LICENSE_1_0.txt or copy at
@@ -71,7 +71,7 @@
    static false_t dispatch(...);
    static T trigger();
    public:
- enum { value = sizeof(dispatch(trigger())) == sizeof(true_t) };
+ static const bool value = sizeof(dispatch(trigger())) == sizeof(true_t);
 };
 
 template<

Modified: branches/release/boost/interprocess/detail/multi_segment_services.hpp
==============================================================================
--- branches/release/boost/interprocess/detail/multi_segment_services.hpp (original)
+++ branches/release/boost/interprocess/detail/multi_segment_services.hpp 2011-12-26 12:21:36 EST (Mon, 26 Dec 2011)
@@ -1,6 +1,6 @@
 //////////////////////////////////////////////////////////////////////////////
 //
-// (C) Copyright Ion Gaztanaga 2005-2009. Distributed under the Boost
+// (C) Copyright Ion Gaztanaga 2005-2011. 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)
 //

Modified: branches/release/boost/interprocess/detail/named_proxy.hpp
==============================================================================
--- branches/release/boost/interprocess/detail/named_proxy.hpp (original)
+++ branches/release/boost/interprocess/detail/named_proxy.hpp 2011-12-26 12:21:36 EST (Mon, 26 Dec 2011)
@@ -1,6 +1,6 @@
 //////////////////////////////////////////////////////////////////////////////
 //
-// (C) Copyright Ion Gaztanaga 2005-2009. Distributed under the Boost
+// (C) Copyright Ion Gaztanaga 2005-2011. 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)
 //
@@ -26,7 +26,7 @@
 #ifndef BOOST_INTERPROCESS_PERFECT_FORWARDING
 #include <boost/interprocess/detail/preprocessor.hpp>
 #else
-#include <boost/interprocess/detail/move.hpp>
+#include <boost/move/move.hpp>
 #include <boost/interprocess/detail/variadic_templates_tools.hpp>
 #endif //#ifdef BOOST_INTERPROCESS_PERFECT_FORWARDING
 
@@ -42,7 +42,7 @@
 template<class T, bool is_iterator, class ...Args>
 struct CtorNArg : public placement_destroy<T>
 {
- typedef ipcdetail::bool_<is_iterator> IsIterator;
+ typedef bool_<is_iterator> IsIterator;
    typedef CtorNArg<T, is_iterator, Args...> self_t;
    typedef typename build_number_seq<sizeof...(Args)>::type index_tuple_t;
 
@@ -71,15 +71,15 @@
 
    private:
    template<int ...IdxPack>
- void construct(void *mem, ipcdetail::true_, const index_tuple<IdxPack...>&)
- { new((void*)mem)T(*boost::interprocess::forward<Args>(get<IdxPack>(args_))...); }
+ void construct(void *mem, true_, const index_tuple<IdxPack...>&)
+ { new((void*)mem)T(*boost::forward<Args>(get<IdxPack>(args_))...); }
 
    template<int ...IdxPack>
- void construct(void *mem, ipcdetail::false_, const index_tuple<IdxPack...>&)
- { new((void*)mem)T(boost::interprocess::forward<Args>(get<IdxPack>(args_))...); }
+ void construct(void *mem, false_, const index_tuple<IdxPack...>&)
+ { new((void*)mem)T(boost::forward<Args>(get<IdxPack>(args_))...); }
 
    template<int ...IdxPack>
- void do_increment(ipcdetail::true_, const index_tuple<IdxPack...>&)
+ void do_increment(true_, const index_tuple<IdxPack...>&)
    {
       this->expansion_helper(++get<IdxPack>(args_)...);
    }
@@ -89,7 +89,7 @@
    {}
 
    template<int ...IdxPack>
- void do_increment(ipcdetail::false_, const index_tuple<IdxPack...>&)
+ void do_increment(false_, const index_tuple<IdxPack...>&)
    {}
 
    tuple<Args&...> args_;
@@ -121,7 +121,7 @@
    T *operator()(Args &&...args) const
    {
       CtorNArg<T, is_iterator, Args...> &&ctor_obj = CtorNArg<T, is_iterator, Args...>
- (boost::interprocess::forward<Args>(args)...);
+ (boost::forward<Args>(args)...);
       return mp_mngr->template
          generic_construct<T>(mp_name, m_num, m_find, m_dothrow, ctor_obj);
    }
@@ -163,13 +163,13 @@
 // struct Ctor2Arg
 // : public placement_destroy<T>
 // {
-// typedef ipcdetail::bool_<is_iterator> IsIterator;
+// typedef bool_<is_iterator> IsIterator;
 // typedef Ctor2Arg self_t;
 //
-// void do_increment(ipcdetail::false_)
+// void do_increment(false_)
 // { ++m_p1; ++m_p2; }
 //
-// void do_increment(ipcdetail::true_){}
+// void do_increment(true_){}
 //
 // self_t& operator++()
 // {
@@ -197,10 +197,10 @@
 // }
 //
 // private:
-// void construct(void *mem, ipcdetail::true_)
+// void construct(void *mem, true_)
 // { new((void*)mem)T(*m_p1, *m_p2); }
 //
-// void construct(void *mem, ipcdetail::false_)
+// void construct(void *mem, false_)
 // { new((void*)mem)T(m_p1, m_p2); }
 //
 // P1 &m_p1; P2 &m_p2;
@@ -218,13 +218,13 @@
    struct BOOST_PP_CAT(BOOST_PP_CAT(Ctor, n), Arg) \
       : public placement_destroy<T> \
    { \
- typedef ipcdetail::bool_<is_iterator> IsIterator; \
+ typedef bool_<is_iterator> IsIterator; \
       typedef BOOST_PP_CAT(BOOST_PP_CAT(Ctor, n), Arg) self_t; \
                                                                            \
- void do_increment(ipcdetail::true_) \
- { BOOST_PP_ENUM(n, BOOST_INTERPROCESS_AUX_PARAM_INC, _); } \
+ void do_increment(true_) \
+ { BOOST_PP_ENUM(n, BOOST_INTERPROCESS_PP_PARAM_INC, _); } \
                                                                            \
- void do_increment(ipcdetail::false_){} \
+ void do_increment(false_){} \
                                                                            \
       self_t& operator++() \
       { \
@@ -236,7 +236,7 @@
                                                                            \
       BOOST_PP_CAT(BOOST_PP_CAT(Ctor, n), Arg) \
          ( BOOST_PP_ENUM(n, BOOST_INTERPROCESS_PP_PARAM_LIST, _) ) \
- : BOOST_PP_ENUM(n, BOOST_INTERPROCESS_AUX_PARAM_INIT, _) {} \
+ : BOOST_PP_ENUM(n, BOOST_INTERPROCESS_PP_PARAM_INIT, _) {} \
                                                                            \
       virtual void construct_n(void *mem \
                         , std::size_t num \
@@ -250,19 +250,19 @@
       } \
                                                                            \
       private: \
- void construct(void *mem, ipcdetail::true_) \
+ void construct(void *mem, true_) \
       { \
          new((void*)mem) T \
          (BOOST_PP_ENUM(n, BOOST_INTERPROCESS_PP_MEMBER_IT_FORWARD, _)); \
       } \
                                                                            \
- void construct(void *mem, ipcdetail::false_) \
+ void construct(void *mem, false_) \
       { \
          new((void*)mem) T \
             (BOOST_PP_ENUM(n, BOOST_INTERPROCESS_PP_MEMBER_FORWARD, _)); \
       } \
                                                                            \
- BOOST_PP_REPEAT(n, BOOST_INTERPROCESS_AUX_PARAM_DEFINE, _) \
+ BOOST_PP_REPEAT(n, BOOST_INTERPROCESS_PP_PARAM_DEFINE, _) \
    }; \
 //!
 #define BOOST_PP_LOCAL_LIMITS (1, BOOST_INTERPROCESS_MAX_CONSTRUCTOR_PARAMETERS)

Modified: branches/release/boost/interprocess/detail/os_file_functions.hpp
==============================================================================
--- branches/release/boost/interprocess/detail/os_file_functions.hpp (original)
+++ branches/release/boost/interprocess/detail/os_file_functions.hpp 2011-12-26 12:21:36 EST (Mon, 26 Dec 2011)
@@ -1,6 +1,6 @@
 //////////////////////////////////////////////////////////////////////////////
 //
-// (C) Copyright Ion Gaztanaga 2005-2009. Distributed under the Boost
+// (C) Copyright Ion Gaztanaga 2005-2011. 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)
 //
@@ -18,6 +18,7 @@
 
 #include <string>
 #include <limits>
+#include <climits>
 
 #if (defined BOOST_INTERPROCESS_WINDOWS)
 # include <boost/interprocess/detail/win32_api.hpp>
@@ -128,12 +129,15 @@
    if(!winapi::get_file_size(hnd, filesize))
       return false;
 
- if(size > (std::numeric_limits<offset_t>::max)()){
+ const offset_t max_filesize = (std::numeric_limits<offset_t>::max)();
+ //Avoid unused variable warnings in 32 bit systems
+ (void)max_filesize;
+ if( sizeof(std::size_t) >= sizeof(offset_t) && size > std::size_t(max_filesize) ){
       winapi::set_last_error(winapi::error_file_too_large);
       return false;
    }
 
- if(size > (unsigned long long)filesize){
+ if(offset_t(size) > filesize){
       if(!winapi::set_file_pointer_ex(hnd, filesize, 0, winapi::file_begin)){
          return false;
       }
@@ -445,11 +449,13 @@
 
 inline bool truncate_file (file_handle_t hnd, std::size_t size)
 {
- if(off_t(size) < 0){
- errno = EINVAL;
- return false;
+ if(sizeof(off_t) == sizeof(std::size_t)){
+ if(size > ((~std::size_t(0)) >> 1)){
+ errno = EINVAL;
+ return false;
+ }
    }
- return 0 == ::ftruncate(hnd, size);
+ return 0 == ::ftruncate(hnd, off_t(size));
 }
 
 inline bool get_file_size(file_handle_t hnd, offset_t &size)

Modified: branches/release/boost/interprocess/detail/os_thread_functions.hpp
==============================================================================
--- branches/release/boost/interprocess/detail/os_thread_functions.hpp (original)
+++ branches/release/boost/interprocess/detail/os_thread_functions.hpp 2011-12-26 12:21:36 EST (Mon, 26 Dec 2011)
@@ -1,6 +1,6 @@
 //////////////////////////////////////////////////////////////////////////////
 //
-// (C) Copyright Ion Gaztanaga 2005-2009. Distributed under the Boost
+// (C) Copyright Ion Gaztanaga 2005-2011. 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)
 //
@@ -23,6 +23,7 @@
 # include <pthread.h>
 # include <unistd.h>
 # include <sched.h>
+# include <time.h>
 # else
 # error Unknown platform
 # endif
@@ -58,6 +59,9 @@
 inline void thread_yield()
 { winapi::sched_yield(); }
 
+inline void thread_sleep(unsigned int ms)
+{ winapi::Sleep(ms); }
+
 //systemwide thread
 inline OS_systemwide_thread_id_t get_current_systemwide_thread_id()
 {
@@ -160,6 +164,12 @@
 inline void thread_yield()
 { ::sched_yield(); }
 
+inline void thread_sleep(unsigned int ms)
+{
+ const struct timespec rqt = { ms/1000u, (ms%1000u)*1000000u };
+ ::nanosleep(&rqt, 0);
+}
+
 //systemwide thread
 inline OS_systemwide_thread_id_t get_current_systemwide_thread_id()
 {

Modified: branches/release/boost/interprocess/detail/pointer_type.hpp
==============================================================================
--- branches/release/boost/interprocess/detail/pointer_type.hpp (original)
+++ branches/release/boost/interprocess/detail/pointer_type.hpp 2011-12-26 12:21:36 EST (Mon, 26 Dec 2011)
@@ -1,6 +1,6 @@
 //////////////////////////////////////////////////////////////////////////////
 //
-// (C) Copyright Ion Gaztanaga 2005-2009.
+// (C) Copyright Ion Gaztanaga 2005-2011.
 // (C) Copyright Gennaro Prota 2003 - 2004.
 //
 // Distributed under the Boost Software License, Version 1.0.

Modified: branches/release/boost/interprocess/detail/posix_time_types_wrk.hpp
==============================================================================
--- branches/release/boost/interprocess/detail/posix_time_types_wrk.hpp (original)
+++ branches/release/boost/interprocess/detail/posix_time_types_wrk.hpp 2011-12-26 12:21:36 EST (Mon, 26 Dec 2011)
@@ -1,6 +1,6 @@
 //////////////////////////////////////////////////////////////////////////////
 //
-// (C) Copyright Ion Gaztanaga 2005-2009. Distributed under the Boost
+// (C) Copyright Ion Gaztanaga 2005-2011. 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)
 //

Modified: branches/release/boost/interprocess/detail/preprocessor.hpp
==============================================================================
--- branches/release/boost/interprocess/detail/preprocessor.hpp (original)
+++ branches/release/boost/interprocess/detail/preprocessor.hpp 2011-12-26 12:21:36 EST (Mon, 26 Dec 2011)
@@ -1,6 +1,6 @@
 //////////////////////////////////////////////////////////////////////////////
 //
-// (C) Copyright Ion Gaztanaga 2008-2009. Distributed under the Boost
+// (C) Copyright Ion Gaztanaga 2008-2011. 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)
 //
@@ -15,7 +15,7 @@
 # pragma once
 #endif
 
-#include "config_begin.hpp"
+#include <boost/interprocess/detail/config_begin.hpp>
 
 #ifdef BOOST_INTERPROCESS_PERFECT_FORWARDING
 #error "This file is not needed when perfect forwarding is available"
@@ -46,11 +46,11 @@
 #endif
 
 #ifndef BOOST_NO_RVALUE_REFERENCES
- #define BOOST_INTERPROCESS_PARAM(U, u) \
+ #define BOOST_INTERPROCESS_PP_PARAM(U, u) \
    U && u \
    //!
 #else
- #define BOOST_INTERPROCESS_PARAM(U, u) \
+ #define BOOST_INTERPROCESS_PP_PARAM(U, u) \
    const U & u \
    //!
 #endif
@@ -59,25 +59,25 @@
 
 #ifdef BOOST_MOVE_OLD_RVALUE_REF_BINDING_RULES
 
-#define BOOST_INTERPROCESS_AUX_PARAM_INIT(z, n, data) \
+#define BOOST_INTERPROCESS_PP_PARAM_INIT(z, n, data) \
   BOOST_PP_CAT(m_p, n) (BOOST_INTERPROCESS_MOVE_NAMESPACE::forward< BOOST_PP_CAT(P, n) >( BOOST_PP_CAT(p, n) )) \
 //!
 
 #else
 
-#define BOOST_INTERPROCESS_AUX_PARAM_INIT(z, n, data) \
+#define BOOST_INTERPROCESS_PP_PARAM_INIT(z, n, data) \
   BOOST_PP_CAT(m_p, n) (BOOST_PP_CAT(p, n)) \
 //!
 
 #endif
 
 #else
-#define BOOST_INTERPROCESS_AUX_PARAM_INIT(z, n, data) \
+#define BOOST_INTERPROCESS_PP_PARAM_INIT(z, n, data) \
   BOOST_PP_CAT(m_p, n) (const_cast<BOOST_PP_CAT(P, n) &>(BOOST_PP_CAT(p, n))) \
 //!
 #endif
 
-#define BOOST_INTERPROCESS_AUX_PARAM_INC(z, n, data) \
+#define BOOST_INTERPROCESS_PP_PARAM_INC(z, n, data) \
   BOOST_PP_CAT(++m_p, n) \
 //!
 
@@ -85,13 +85,13 @@
 
 #if defined(BOOST_MOVE_MSVC_10_MEMBER_RVALUE_REF_BUG)
 
-#define BOOST_INTERPROCESS_AUX_PARAM_DEFINE(z, n, data) \
+#define BOOST_INTERPROCESS_PP_PARAM_DEFINE(z, n, data) \
   BOOST_PP_CAT(P, n) & BOOST_PP_CAT(m_p, n); \
 //!
 
 #else
 
-#define BOOST_INTERPROCESS_AUX_PARAM_DEFINE(z, n, data) \
+#define BOOST_INTERPROCESS_PP_PARAM_DEFINE(z, n, data) \
   BOOST_PP_CAT(P, n) && BOOST_PP_CAT(m_p, n); \
 //!
 
@@ -99,13 +99,13 @@
 
 
 #else
-#define BOOST_INTERPROCESS_AUX_PARAM_DEFINE(z, n, data) \
+#define BOOST_INTERPROCESS_PP_PARAM_DEFINE(z, n, data) \
   BOOST_PP_CAT(P, n) & BOOST_PP_CAT(m_p, n); \
 //!
 #endif
 
 #define BOOST_INTERPROCESS_PP_PARAM_FORWARD(z, n, data) \
-::boost::interprocess::forward< BOOST_PP_CAT(P, n) >( BOOST_PP_CAT(p, n) ) \
+::boost::forward< BOOST_PP_CAT(P, n) >( BOOST_PP_CAT(p, n) ) \
 //!
 
 #if !defined(BOOST_NO_RVALUE_REFERENCES) && defined(BOOST_MOVE_MSVC_10_MEMBER_RVALUE_REF_BUG)
@@ -113,13 +113,13 @@
 #include <boost/container/detail/stored_ref.hpp>
 
 #define BOOST_INTERPROCESS_PP_MEMBER_FORWARD(z, n, data) \
-::boost::container::containers_detail::stored_ref< BOOST_PP_CAT(P, n) >::forward( BOOST_PP_CAT(m_p, n) ) \
+::boost::container::container_detail::stored_ref< BOOST_PP_CAT(P, n) >::forward( BOOST_PP_CAT(m_p, n) ) \
 //!
 
 #else
 
 #define BOOST_INTERPROCESS_PP_MEMBER_FORWARD(z, n, data) \
-::boost::interprocess::forward< BOOST_PP_CAT(P, n) >( BOOST_PP_CAT(m_p, n) ) \
+::boost::forward< BOOST_PP_CAT(P, n) >( BOOST_PP_CAT(m_p, n) ) \
 //!
 
 #endif //!defined(BOOST_NO_RVALUE_REFERENCES) && defined(BOOST_MOVE_MSVC_10_MEMBER_RVALUE_REF_BUG)

Modified: branches/release/boost/interprocess/detail/robust_emulation.hpp
==============================================================================
--- branches/release/boost/interprocess/detail/robust_emulation.hpp (original)
+++ branches/release/boost/interprocess/detail/robust_emulation.hpp 2011-12-26 12:21:36 EST (Mon, 26 Dec 2011)
@@ -1,6 +1,6 @@
 //////////////////////////////////////////////////////////////////////////////
 //
-// (C) Copyright Ion Gaztanaga 2010-2010. Distributed under the Boost
+// (C) Copyright Ion Gaztanaga 2010-2011. 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)
 //
@@ -173,9 +173,9 @@
 
 //This is the mutex class. Mutex should follow mutex concept
 //with an additonal "take_ownership()" function to take ownership of the
-//mutex when robust_emulation_mutex determines the previous owner was dead.
+//mutex when robust_spin_mutex determines the previous owner was dead.
 template<class Mutex>
-class robust_emulation_mutex
+class robust_spin_mutex
 {
    public:
    static const boost::uint32_t correct_state = 0;
@@ -184,7 +184,7 @@
 
    typedef robust_emulation_helpers::mutex_traits<Mutex> mutex_traits_t;
 
- robust_emulation_mutex();
+ robust_spin_mutex();
    void lock();
    bool try_lock();
    bool timed_lock(const boost::posix_time::ptime &abs_time);
@@ -208,12 +208,12 @@
 };
 
 template<class Mutex>
-inline robust_emulation_mutex<Mutex>::robust_emulation_mutex()
+inline robust_spin_mutex<Mutex>::robust_spin_mutex()
    : mtx(), owner(get_invalid_process_id()), state(correct_state)
 {}
 
 template<class Mutex>
-inline void robust_emulation_mutex<Mutex>::lock()
+inline void robust_spin_mutex<Mutex>::lock()
 {
    //If the mutex is broken (recovery didn't call consistent()),
    //then throw an exception
@@ -252,7 +252,7 @@
 }
 
 template<class Mutex>
-inline bool robust_emulation_mutex<Mutex>::try_lock()
+inline bool robust_spin_mutex<Mutex>::try_lock()
 {
    //Same as lock() but without spinning
    if(atomic_read32(&this->state) == broken_state){
@@ -278,7 +278,7 @@
 }
 
 template<class Mutex>
-inline bool robust_emulation_mutex<Mutex>::timed_lock
+inline bool robust_spin_mutex<Mutex>::timed_lock
    (const boost::posix_time::ptime &abs_time)
 {
    //Same as lock() but with an additional timeout
@@ -309,13 +309,13 @@
 }
 
 template<class Mutex>
-inline void robust_emulation_mutex<Mutex>::owner_to_filename(boost::uint32_t owner, std::string &s)
+inline void robust_spin_mutex<Mutex>::owner_to_filename(boost::uint32_t owner, std::string &s)
 {
    robust_emulation_helpers::create_and_get_robust_lock_file_path(s, owner);
 }
 
 template<class Mutex>
-inline bool robust_emulation_mutex<Mutex>::robust_check()
+inline bool robust_spin_mutex<Mutex>::robust_check()
 {
    //If the old owner was dead, and we've acquired ownership, mark
    //the mutex as 'fixing'. This means that a "consistent()" is needed
@@ -328,7 +328,7 @@
 }
 
 template<class Mutex>
-inline bool robust_emulation_mutex<Mutex>::check_if_owner_dead_and_take_ownership_atomically()
+inline bool robust_spin_mutex<Mutex>::check_if_owner_dead_and_take_ownership_atomically()
 {
    boost::uint32_t cur_owner = get_current_process_id();
    boost::uint32_t old_owner = atomic_read32(&this->owner), old_owner2;
@@ -349,7 +349,7 @@
 }
 
 template<class Mutex>
-inline bool robust_emulation_mutex<Mutex>::is_owner_dead(boost::uint32_t owner)
+inline bool robust_spin_mutex<Mutex>::is_owner_dead(boost::uint32_t owner)
 {
    //If owner is an invalid id, then it's clear it's dead
    if(owner == (boost::uint32_t)get_invalid_process_id()){
@@ -387,7 +387,7 @@
 }
 
 template<class Mutex>
-inline void robust_emulation_mutex<Mutex>::consistent()
+inline void robust_spin_mutex<Mutex>::consistent()
 {
    //This function supposes the previous state was "fixing"
    //and the current process holds the mutex
@@ -400,14 +400,14 @@
 }
 
 template<class Mutex>
-inline bool robust_emulation_mutex<Mutex>::previous_owner_dead()
+inline bool robust_spin_mutex<Mutex>::previous_owner_dead()
 {
    //Notifies if a owner recovery has been performed in the last lock()
    return atomic_read32(&this->state) == fixing_state;
 };
 
 template<class Mutex>
-inline void robust_emulation_mutex<Mutex>::unlock()
+inline void robust_spin_mutex<Mutex>::unlock()
 {
    //If in "fixing" state, unlock and mark the mutex as unrecoverable
    //so next locks will fail and all threads will be notified that the
@@ -421,7 +421,7 @@
 }
 
 template<class Mutex>
-inline bool robust_emulation_mutex<Mutex>::lock_own_unique_file()
+inline bool robust_spin_mutex<Mutex>::lock_own_unique_file()
 {
    //This function forces instantiation of the singleton
    robust_emulation_helpers::robust_mutex_lock_file* dummy =

Modified: branches/release/boost/interprocess/detail/segment_manager_helper.hpp
==============================================================================
--- branches/release/boost/interprocess/detail/segment_manager_helper.hpp (original)
+++ branches/release/boost/interprocess/detail/segment_manager_helper.hpp 2011-12-26 12:21:36 EST (Mon, 26 Dec 2011)
@@ -1,6 +1,6 @@
 //////////////////////////////////////////////////////////////////////////////
 //
-// (C) Copyright Ion Gaztanaga 2005-2009. Distributed under the Boost
+// (C) Copyright Ion Gaztanaga 2005-2011. 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,6 +27,7 @@
 #include <boost/interprocess/exceptions.hpp>
 #include <boost/type_traits/make_unsigned.hpp>
 #include <boost/type_traits/alignment_of.hpp>
+#include <boost/intrusive/pointer_traits.hpp>
 #include <cstddef> //std::size_t
 #include <string> //char_traits
 #include <new> //std::nothrow
@@ -207,7 +208,7 @@
    }
 };
 
-inline void array_construct(void *mem, std::size_t num, ipcdetail::in_place_interface &table)
+inline void array_construct(void *mem, std::size_t num, in_place_interface &table)
 {
    //Try constructors
    std::size_t constructed = 0;
@@ -281,7 +282,7 @@
    {
       return const_cast<block_header<size_type>*>
          (reinterpret_cast<const block_header<size_type> *>(reinterpret_cast<const char*>(this) +
- ::boost::interprocess::ipcdetail::get_rounded_size(size_type(sizeof(*this)), size_type(BlockHdrAlignment))));
+ get_rounded_size(size_type(sizeof(*this)), size_type(BlockHdrAlignment))));
    }
 
    bool operator <(const intrusive_value_type_impl<Hook, CharType, SizeType> & other) const
@@ -314,11 +315,11 @@
       : m_name(name)
    {}
 
- char_ptr_holder(const ipcdetail::anonymous_instance_t *)
+ char_ptr_holder(const anonymous_instance_t *)
       : m_name(static_cast<CharType*>(0))
    {}
 
- char_ptr_holder(const ipcdetail::unique_instance_t *)
+ char_ptr_holder(const unique_instance_t *)
       : m_name(reinterpret_cast<CharType*>(-1))
    {}
 
@@ -337,7 +338,7 @@
    typedef typename boost::
       pointer_to_other<VoidPointer, const CharT>::type const_char_ptr_t;
    typedef CharT char_type;
- typedef typename std::iterator_traits<const_char_ptr_t>::difference_type difference_type;
+ typedef typename boost::intrusive::pointer_traits<const_char_ptr_t>::difference_type difference_type;
    typedef typename boost::make_unsigned<difference_type>::type size_type;
 
    private:
@@ -357,8 +358,8 @@
       return (m_len < right.m_len) ||
                (m_len == right.m_len &&
                std::char_traits<char_type>::compare
- (ipcdetail::get_pointer(mp_str)
- ,ipcdetail::get_pointer(right.mp_str), m_len) < 0);
+ (to_raw_pointer(mp_str)
+ ,to_raw_pointer(right.mp_str), m_len) < 0);
    }
 
    //!Equal to function for index ordering
@@ -366,8 +367,8 @@
    {
       return m_len == right.m_len &&
                std::char_traits<char_type>::compare
- (ipcdetail::get_pointer(mp_str),
- ipcdetail::get_pointer(right.mp_str), m_len) == 0;
+ (to_raw_pointer(mp_str),
+ to_raw_pointer(right.mp_str), m_len) == 0;
    }
 
    void name(const CharT *name)
@@ -377,7 +378,7 @@
    { m_len = len; }
 
    const CharT *name() const
- { return ipcdetail::get_pointer(mp_str); }
+ { return to_raw_pointer(mp_str); }
 
    size_type name_length() const
    { return m_len; }
@@ -393,7 +394,7 @@
    index_data(void *ptr) : m_ptr(ptr){}
 
    void *value() const
- { return static_cast<void*>(ipcdetail::get_pointer(m_ptr)); }
+ { return static_cast<void*>(to_raw_pointer(m_ptr)); }
 };
 
 template<class MemoryAlgorithm>
@@ -405,14 +406,14 @@
 {
    typedef typename MemoryAlgorithm::void_pointer void_pointer;
    typedef CharT char_type;
- typedef ipcdetail::index_key<CharT, void_pointer> key_type;
- typedef ipcdetail::index_data<void_pointer> mapped_type;
+ typedef index_key<CharT, void_pointer> key_type;
+ typedef index_data<void_pointer> mapped_type;
    typedef typename segment_manager_base_type
       <MemoryAlgorithm>::type segment_manager_base;
 
    template<class HeaderBase>
    struct intrusive_value_type
- { typedef ipcdetail::intrusive_value_type_impl<HeaderBase, CharT, typename segment_manager_base::size_type> type; };
+ { typedef intrusive_value_type_impl<HeaderBase, CharT, typename segment_manager_base::size_type> type; };
 
    typedef intrusive_compare_key<CharT> intrusive_compare_key_type;
 };
@@ -464,7 +465,7 @@
    const void *value() const
    {
       return reinterpret_cast<block_header<size_type>*>
- (ipcdetail::get_pointer(m_val->second.m_ptr))->value();
+ (to_raw_pointer(m_val->second.m_ptr))->value();
    }
 
    const typename Iterator::value_type *m_val;

Modified: branches/release/boost/interprocess/detail/tmp_dir_helpers.hpp
==============================================================================
--- branches/release/boost/interprocess/detail/tmp_dir_helpers.hpp (original)
+++ branches/release/boost/interprocess/detail/tmp_dir_helpers.hpp 2011-12-26 12:21:36 EST (Mon, 26 Dec 2011)
@@ -1,6 +1,6 @@
 //////////////////////////////////////////////////////////////////////////////
 //
-// (C) Copyright Ion Gaztanaga 2007-2009. Distributed under the Boost
+// (C) Copyright Ion Gaztanaga 2007-2011. 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)
 //
@@ -43,7 +43,7 @@
       s += bootstamp;
    }
    else{
- s = bootstamp;
+ s.swap(bootstamp);
    }
 }
 #elif defined(BOOST_INTERPROCESS_HAS_BSD_KERNEL_BOOTTIME)
@@ -64,9 +64,10 @@
       , '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' };
 
    std::size_t char_counter = 0;
- long long fields[2] = { result.tv_sec, result.tv_usec };
+ //32 bit values to allow 32 and 64 bit process IPC
+ boost::uint32_t fields[2] = { boost::uint32_t(result.tv_sec), boost::uint32_t(result.tv_usec) };
    for(std::size_t field = 0; field != 2; ++field){
- for(std::size_t i = 0; i != sizeof(long long); ++i){
+ for(std::size_t i = 0; i != sizeof(fields[0]); ++i){
          const char *ptr = (const char *)&fields[field];
          bootstamp_str[char_counter++] = Characters[(ptr[i]&0xF0)>>4];
          bootstamp_str[char_counter++] = Characters[(ptr[i]&0x0F)];

Modified: branches/release/boost/interprocess/detail/transform_iterator.hpp
==============================================================================
--- branches/release/boost/interprocess/detail/transform_iterator.hpp (original)
+++ branches/release/boost/interprocess/detail/transform_iterator.hpp 2011-12-26 12:21:36 EST (Mon, 26 Dec 2011)
@@ -1,6 +1,6 @@
 //////////////////////////////////////////////////////////////////////////////
 //
-// (C) Copyright Ion Gaztanaga 2005-2009.
+// (C) Copyright Ion Gaztanaga 2005-2011.
 // (C) Copyright Gennaro Prota 2003 - 2004.
 //
 // Distributed under the Boost Software License, Version 1.0.

Modified: branches/release/boost/interprocess/detail/type_traits.hpp
==============================================================================
--- branches/release/boost/interprocess/detail/type_traits.hpp (original)
+++ branches/release/boost/interprocess/detail/type_traits.hpp 2011-12-26 12:21:36 EST (Mon, 26 Dec 2011)
@@ -1,6 +1,6 @@
 //////////////////////////////////////////////////////////////////////////////
 // (C) Copyright John Maddock 2000.
-// (C) Copyright Ion Gaztanaga 2005-2009.
+// (C) Copyright Ion Gaztanaga 2005-2011.
 //
 // Distributed under the Boost Software License, Version 1.0.
 // (See accompanying file LICENSE_1_0.txt or copy at
@@ -40,25 +40,25 @@
 template<class T>
 struct is_reference
 {
- enum { value = false };
+ static const bool value = false;
 };
 
 template<class T>
 struct is_reference<T&>
 {
- enum { value = true };
+ static const bool value = true;
 };
 
 template<class T>
 struct is_pointer
 {
- enum { value = false };
+ static const bool value = false;
 };
 
 template<class T>
 struct is_pointer<T*>
 {
- enum { value = true };
+ static const bool value = true;
 };
 
 template <typename T>
@@ -93,6 +93,30 @@
 struct add_const_reference<T&>
 { typedef T& type; };
 
+template<class T>
+struct remove_const
+{
+ typedef T type;
+};
+
+template<class T>
+struct remove_const<const T>
+{
+ typedef T type;
+};
+
+template<class T>
+struct remove_volatile
+{
+ typedef T type;
+};
+
+template<class T>
+struct remove_volatile<volatile T>
+{
+ typedef T type;
+};
+
 template <typename T, typename U>
 struct is_same
 {
@@ -116,7 +140,6 @@
 } //namespace interprocess {
 } //namespace boost {
 
-#endif //#ifndef BOOST_INTERPROCESS_DETAIL_TYPE_TRAITS_HPP
-
 #include <boost/interprocess/detail/config_end.hpp>
 
+#endif //#ifndef BOOST_INTERPROCESS_DETAIL_TYPE_TRAITS_HPP

Modified: branches/release/boost/interprocess/detail/utilities.hpp
==============================================================================
--- branches/release/boost/interprocess/detail/utilities.hpp (original)
+++ branches/release/boost/interprocess/detail/utilities.hpp 2011-12-26 12:21:36 EST (Mon, 26 Dec 2011)
@@ -1,6 +1,6 @@
 //////////////////////////////////////////////////////////////////////////////
 //
-// (C) Copyright Ion Gaztanaga 2005-2009.
+// (C) Copyright Ion Gaztanaga 2005-2011.
 // (C) Copyright Gennaro Prota 2003 - 2004.
 //
 // Distributed under the Boost Software License, Version 1.0.
@@ -22,14 +22,15 @@
 #include <boost/interprocess/detail/workaround.hpp>
 
 #include <boost/interprocess/interprocess_fwd.hpp>
-#include <boost/interprocess/detail/move.hpp>
+#include <boost/move/move.hpp>
 #include <boost/type_traits/has_trivial_destructor.hpp>
 #include <boost/interprocess/detail/min_max.hpp>
 #include <boost/interprocess/detail/type_traits.hpp>
 #include <boost/interprocess/detail/transform_iterator.hpp>
 #include <boost/interprocess/detail/mpl.hpp>
 #include <boost/interprocess/containers/version_type.hpp>
-#include <boost/interprocess/detail/move.hpp>
+#include <boost/intrusive/pointer_traits.hpp>
+#include <boost/move/move.hpp>
 #include <utility>
 #include <algorithm>
 
@@ -37,29 +38,14 @@
 namespace interprocess {
 namespace ipcdetail {
 
-template<class SmartPtr>
-struct smart_ptr_type
-{
- typedef typename SmartPtr::value_type value_type;
- typedef value_type *pointer;
- static pointer get (const SmartPtr &smartptr)
- { return smartptr.get();}
-};
-
-template<class T>
-struct smart_ptr_type<T*>
-{
- typedef T value_type;
- typedef value_type *pointer;
- static pointer get (pointer ptr)
- { return ptr;}
-};
+template <class T>
+inline T* to_raw_pointer(T* p)
+{ return p; }
 
-//!Overload for smart pointers to avoid ADL problems with get_pointer
-template<class Ptr>
-inline typename smart_ptr_type<Ptr>::pointer
-get_pointer(const Ptr &ptr)
-{ return smart_ptr_type<Ptr>::get(ptr); }
+template <class Pointer>
+inline typename boost::intrusive::pointer_traits<Pointer>::element_type*
+to_raw_pointer(const Pointer &p)
+{ return boost::interprocess::ipcdetail::to_raw_pointer(p.operator->()); }
 
 //!To avoid ADL problems with swap
 template <class T>
@@ -100,14 +86,14 @@
 template <std::size_t OrigSize, std::size_t RoundTo>
 struct ct_rounded_size
 {
- enum { value = ((OrigSize-1)/RoundTo+1)*RoundTo };
+ static const std::size_t value = ((OrigSize-1)/RoundTo+1)*RoundTo;
 };
 
 // Gennaro Prota wrote this. Thanks!
 template <int p, int n = 4>
 struct ct_max_pow2_less
 {
- enum { c = 2*n < p };
+ static const std::size_t c = 2*n < p;
 
    static const std::size_t value =
          c ? (ct_max_pow2_less< c*p, 2*c*n>::value) : n;
@@ -127,7 +113,7 @@
 template <class Index>
 struct is_node_index
 {
- enum { value = false };
+ static const bool value = false;
 };
 
 //!Trait class to detect if an index is an intrusive
@@ -137,7 +123,7 @@
 template <class Index>
 struct is_intrusive_index
 {
- enum { value = false };
+ static const bool value = false;
 };
 
 template <typename T> T*

Modified: branches/release/boost/interprocess/detail/variadic_templates_tools.hpp
==============================================================================
--- branches/release/boost/interprocess/detail/variadic_templates_tools.hpp (original)
+++ branches/release/boost/interprocess/detail/variadic_templates_tools.hpp 2011-12-26 12:21:36 EST (Mon, 26 Dec 2011)
@@ -1,6 +1,6 @@
 //////////////////////////////////////////////////////////////////////////////
 //
-// (C) Copyright Ion Gaztanaga 2008-2009. Distributed under the Boost
+// (C) Copyright Ion Gaztanaga 2008-2011. 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)
 //

Modified: branches/release/boost/interprocess/detail/win32_api.hpp
==============================================================================
--- branches/release/boost/interprocess/detail/win32_api.hpp (original)
+++ branches/release/boost/interprocess/detail/win32_api.hpp 2011-12-26 12:21:36 EST (Mon, 26 Dec 2011)
@@ -1,6 +1,6 @@
 //////////////////////////////////////////////////////////////////////////////
 //
-// (C) Copyright Ion Gaztanaga 2005-2009. Distributed under the Boost
+// (C) Copyright Ion Gaztanaga 2005-2011. 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)
 //
@@ -8,11 +8,12 @@
 //
 //////////////////////////////////////////////////////////////////////////////
 
-#ifndef BOOST_INTERPROCESS_WIN32_SYNC_PRIMITIVES_HPP
-#define BOOST_INTERPROCESS_WIN32_SYNC_PRIMITIVES_HPP
+#ifndef BOOST_INTERPROCESS_WIN32_PRIMITIVES_HPP
+#define BOOST_INTERPROCESS_WIN32_PRIMITIVES_HPP
 
 #include <boost/interprocess/detail/config_begin.hpp>
 #include <boost/interprocess/detail/workaround.hpp>
+#include <boost/date_time/filetime_functions.hpp>
 #include <cstddef>
 #include <cstring>
 #include <cassert>
@@ -164,18 +165,20 @@
 static unsigned long key_query_value = 0x0001;
 
 //COM API
-const long RPC_C_AUTHN_LEVEL_PKT_IG = 4;
-const long RPC_C_IMP_LEVEL_IMPERSONATE_IG = 3;
-const long EOAC_NONE_IG = 0;
-const long CLSCTX_INPROC_SERVER_IG = 0x1;
-const long CLSCTX_LOCAL_SERVER_IG = 0x4;
-const long WBEM_FLAG_RETURN_IMMEDIATELY_IG = 0x10;
-const long WBEM_FLAG_RETURN_WHEN_COMPLETE_IG = 0x0;
-const long WBEM_FLAG_FORWARD_ONLY_IG = 0x20;
-const long WBEM_INFINITE_IG = 0xffffffffL;
-const long RPC_E_TOO_LATE_IG = 0x80010119L;
-const long S_OK_IG = 0L;
-const long S_FALSE_IG = 1;
+const unsigned long RPC_C_AUTHN_LEVEL_PKT_BIPC = 4;
+const unsigned long RPC_C_AUTHN_DEFAULT_BIPC = 0xffffffffL;
+const unsigned long RPC_C_AUTHZ_DEFAULT_BIPC = 0xffffffffL;
+const unsigned long RPC_C_IMP_LEVEL_IMPERSONATE_BIPC = 3;
+const signed long EOAC_NONE_BIPC = 0;
+const signed long CLSCTX_INPROC_SERVER_BIPC = 0x1;
+const signed long CLSCTX_LOCAL_SERVER_BIPC = 0x4;
+const signed long WBEM_FLAG_RETURN_IMMEDIATELY_BIPC = 0x10;
+const signed long WBEM_FLAG_RETURN_WHEN_COMPLETE_BIPC = 0x0;
+const signed long WBEM_FLAG_FORWARD_ONLY_BIPC = 0x20;
+const signed long WBEM_INFINITE_BIPC = 0xffffffffL;
+const signed long RPC_E_TOO_LATE_BIPC = 0x80010119L;
+const signed long S_OK_BIPC = 0L;
+const signed long S_FALSE_BIPC = 1;
 
 } //namespace winapi {
 } //namespace interprocess {
@@ -186,7 +189,7 @@
 namespace interprocess {
 namespace winapi {
 
-struct GUID_IG
+struct GUID_BIPC
 {
    unsigned long Data1;
    unsigned short Data2;
@@ -194,10 +197,10 @@
    unsigned char Data4[8];
 };
 
-const GUID_IG CLSID_WbemAdministrativeLocator =
+const GUID_BIPC CLSID_WbemAdministrativeLocator =
    { 0xcb8555cc, 0x9128, 0x11d1, {0xad, 0x9b, 0x00, 0xc0, 0x4f, 0xd8, 0xfd, 0xff}};
 
-const GUID_IG IID_IUnknown = { 0x00000000, 0x0000, 0x0000, {0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46}};
+const GUID_BIPC IID_IUnknown = { 0x00000000, 0x0000, 0x0000, {0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46}};
 
 struct wchar_variant
 {
@@ -208,11 +211,11 @@
    } value;
 };
 
- struct IUnknown_IG
+ struct IUnknown_BIPC
    {
       public:
       virtual long __stdcall QueryInterface(
- /* [in] */ const GUID_IG &riid,
+ /* [in] */ const GUID_BIPC &riid,
             /* [iid_is][out] */ void **ppvObject) = 0;
       
       virtual unsigned long __stdcall AddRef( void) = 0;
@@ -220,7 +223,7 @@
       virtual unsigned long __stdcall Release( void) = 0;
    };
 
-struct IWbemClassObject_IG : public IUnknown_IG
+struct IWbemClassObject_BIPC : public IUnknown_BIPC
 {
    public:
    virtual long __stdcall GetQualifierSet(
@@ -265,7 +268,7 @@
       /* [out] */ void **ppQualSet) = 0;
    
    virtual long __stdcall Clone(
- /* [out] */ IWbemClassObject_IG **ppCopy) = 0;
+ /* [out] */ IWbemClassObject_BIPC **ppCopy) = 0;
    
    virtual long __stdcall GetObjectText(
       /* [in] */ long lFlags,
@@ -273,15 +276,15 @@
    
    virtual long __stdcall SpawnDerivedClass(
       /* [in] */ long lFlags,
- /* [out] */ IWbemClassObject_IG **ppNewClass) = 0;
+ /* [out] */ IWbemClassObject_BIPC **ppNewClass) = 0;
    
    virtual long __stdcall SpawnInstance(
       /* [in] */ long lFlags,
- /* [out] */ IWbemClassObject_IG **ppNewInstance) = 0;
+ /* [out] */ IWbemClassObject_BIPC **ppNewInstance) = 0;
    
    virtual long __stdcall CompareTo(
       /* [in] */ long lFlags,
- /* [in] */ IWbemClassObject_IG *pCompareTo) = 0;
+ /* [in] */ IWbemClassObject_BIPC *pCompareTo) = 0;
    
    virtual long __stdcall GetPropertyOrigin(
       /* [string][in] */ const wchar_t * wszName,
@@ -293,14 +296,14 @@
    virtual long __stdcall GetMethod(
       /* [string][in] */ const wchar_t * wszName,
       /* [in] */ long lFlags,
- /* [out] */ IWbemClassObject_IG **ppInSignature,
- /* [out] */ IWbemClassObject_IG **ppOutSignature) = 0;
+ /* [out] */ IWbemClassObject_BIPC **ppInSignature,
+ /* [out] */ IWbemClassObject_BIPC **ppOutSignature) = 0;
    
    virtual long __stdcall PutMethod(
       /* [string][in] */ const wchar_t * wszName,
       /* [in] */ long lFlags,
- /* [in] */ IWbemClassObject_IG *pInSignature,
- /* [in] */ IWbemClassObject_IG *pOutSignature) = 0;
+ /* [in] */ IWbemClassObject_BIPC *pInSignature,
+ /* [in] */ IWbemClassObject_BIPC *pOutSignature) = 0;
    
    virtual long __stdcall DeleteMethod(
       /* [string][in] */ const wchar_t * wszName) = 0;
@@ -311,8 +314,8 @@
    virtual long __stdcall NextMethod(
       /* [in] */ long lFlags,
       /* [unique][in][out] */ wchar_t * *pstrName,
- /* [unique][in][out] */ IWbemClassObject_IG **ppInSignature,
- /* [unique][in][out] */ IWbemClassObject_IG **ppOutSignature) = 0;
+ /* [unique][in][out] */ IWbemClassObject_BIPC **ppInSignature,
+ /* [unique][in][out] */ IWbemClassObject_BIPC **ppOutSignature) = 0;
    
    virtual long __stdcall EndMethodEnumeration( void) = 0;
    
@@ -327,11 +330,11 @@
 };
 
 
-struct IWbemContext_IG : public IUnknown_IG
+struct IWbemContext_BIPC : public IUnknown_BIPC
 {
 public:
    virtual long __stdcall Clone(
- /* [out] */ IWbemContext_IG **ppNewCopy) = 0;
+ /* [out] */ IWbemContext_BIPC **ppNewCopy) = 0;
    
    virtual long __stdcall GetNames(
       /* [in] */ long lFlags,
@@ -366,7 +369,7 @@
 };
 
 
-struct IEnumWbemClassObject_IG : public IUnknown_IG
+struct IEnumWbemClassObject_BIPC : public IUnknown_BIPC
 {
 public:
    virtual long __stdcall Reset( void) = 0;
@@ -374,7 +377,7 @@
    virtual long __stdcall Next(
       /* [in] */ long lTimeout,
       /* [in] */ unsigned long uCount,
- /* [length_is][size_is][out] */ IWbemClassObject_IG **apObjects,
+ /* [length_is][size_is][out] */ IWbemClassObject_BIPC **apObjects,
       /* [out] */ unsigned long *puReturned) = 0;
    
    virtual long __stdcall NextAsync(
@@ -390,7 +393,7 @@
    
 };
 
-struct IWbemServices_IG : public IUnknown_IG
+struct IWbemServices_BIPC : public IUnknown_BIPC
 {
 public:
    virtual long __stdcall OpenNamespace(
@@ -421,13 +424,13 @@
       /* [in] */ void *pResponseHandler) = 0;
    
    virtual long __stdcall PutClass(
- /* [in] */ IWbemClassObject_IG *pObject,
+ /* [in] */ IWbemClassObject_BIPC *pObject,
       /* [in] */ long lFlags,
       /* [in] */ void *pCtx,
       /* [unique][in][out] */ void **ppCallResult) = 0;
    
    virtual long __stdcall PutClassAsync(
- /* [in] */ IWbemClassObject_IG *pObject,
+ /* [in] */ IWbemClassObject_BIPC *pObject,
       /* [in] */ long lFlags,
       /* [in] */ void *pCtx,
       /* [in] */ void *pResponseHandler) = 0;
@@ -496,50 +499,50 @@
       /* [in] */ const wchar_t * strQueryLanguage,
       /* [in] */ const wchar_t * strQuery,
       /* [in] */ long lFlags,
- /* [in] */ IWbemContext_IG *pCtx,
- /* [out] */ IEnumWbemClassObject_IG **ppEnum) = 0;
+ /* [in] */ IWbemContext_BIPC *pCtx,
+ /* [out] */ IEnumWbemClassObject_BIPC **ppEnum) = 0;
 
    virtual long __stdcall ExecQueryAsync(
       /* [in] */ const wchar_t * strQueryLanguage,
       /* [in] */ const wchar_t * strQuery,
       /* [in] */ long lFlags,
- /* [in] */ IWbemContext_IG *pCtx,
+ /* [in] */ IWbemContext_BIPC *pCtx,
       /* [in] */ void *pResponseHandler) = 0;
    
    virtual long __stdcall ExecNotificationQuery(
       /* [in] */ const wchar_t * strQueryLanguage,
       /* [in] */ const wchar_t * strQuery,
       /* [in] */ long lFlags,
- /* [in] */ IWbemContext_IG *pCtx,
+ /* [in] */ IWbemContext_BIPC *pCtx,
       /* [out] */ void **ppEnum) = 0;
    
    virtual long __stdcall ExecNotificationQueryAsync(
       /* [in] */ const wchar_t * strQueryLanguage,
       /* [in] */ const wchar_t * strQuery,
       /* [in] */ long lFlags,
- /* [in] */ IWbemContext_IG *pCtx,
+ /* [in] */ IWbemContext_BIPC *pCtx,
       /* [in] */ void *pResponseHandler) = 0;
    
    virtual long __stdcall ExecMethod(
       /* [in] */ const wchar_t * strObjectPath,
       /* [in] */ const wchar_t * strMethodName,
       /* [in] */ long lFlags,
- /* [in] */ IWbemContext_IG *pCtx,
- /* [in] */ IWbemClassObject_IG *pInParams,
- /* [unique][in][out] */ IWbemClassObject_IG **ppOutParams,
+ /* [in] */ IWbemContext_BIPC *pCtx,
+ /* [in] */ IWbemClassObject_BIPC *pInParams,
+ /* [unique][in][out] */ IWbemClassObject_BIPC **ppOutParams,
       /* [unique][in][out] */ void **ppCallResult) = 0;
    
    virtual long __stdcall ExecMethodAsync(
       /* [in] */ const wchar_t * strObjectPath,
       /* [in] */ const wchar_t * strMethodName,
       /* [in] */ long lFlags,
- /* [in] */ IWbemContext_IG *pCtx,
- /* [in] */ IWbemClassObject_IG *pInParams,
+ /* [in] */ IWbemContext_BIPC *pCtx,
+ /* [in] */ IWbemClassObject_BIPC *pInParams,
       /* [in] */ void *pResponseHandler) = 0;
    
 };
 
-struct IWbemLocator_IG : public IUnknown_IG
+struct IWbemLocator_BIPC : public IUnknown_BIPC
 {
 public:
    virtual long __stdcall ConnectServer(
@@ -550,7 +553,7 @@
       /* [in] */ long lSecurityFlags,
       /* [in] */ const wchar_t * strAuthority,
       /* [in] */ void *pCtx,
- /* [out] */ IWbemServices_IG **ppNamespace) = 0;
+ /* [out] */ IWbemServices_BIPC **ppNamespace) = 0;
    
 };
  
@@ -803,8 +806,8 @@
 extern "C" __declspec(dllimport) void *__stdcall FindFirstFileA(const char *lpFileName, win32_find_data_t *lpFindFileData);
 extern "C" __declspec(dllimport) int __stdcall FindNextFileA(void *hFindFile, win32_find_data_t *lpFindFileData);
 extern "C" __declspec(dllimport) int __stdcall FindClose(void *hFindFile);
-extern "C" __declspec(dllimport) void __stdcall GetSystemTimeAsFileTime(interprocess_filetime*);
-extern "C" __declspec(dllimport) int __stdcall FileTimeToLocalFileTime(const interprocess_filetime *in, const interprocess_filetime *out);
+//extern "C" __declspec(dllimport) void __stdcall GetSystemTimeAsFileTime(interprocess_filetime*);
+//extern "C" __declspec(dllimport) int __stdcall FileTimeToLocalFileTime(const interprocess_filetime *in, const interprocess_filetime *out);
 extern "C" __declspec(dllimport) void * __stdcall CreateMutexA(interprocess_security_attributes*, int, const char *);
 extern "C" __declspec(dllimport) void * __stdcall OpenMutexA(unsigned long, int, const char *);
 extern "C" __declspec(dllimport) unsigned long __stdcall WaitForSingleObject(void *, unsigned long);
@@ -852,6 +855,7 @@
 extern "C" __declspec(dllimport) long __stdcall RegOpenKeyExA(void *, const char *, unsigned long, unsigned long, void **);
 extern "C" __declspec(dllimport) long __stdcall RegQueryValueExA(void *, const char *, unsigned long*, unsigned long*, unsigned char *, unsigned long*);
 extern "C" __declspec(dllimport) long __stdcall RegCloseKey(void *);
+extern "C" __declspec(dllimport) int __stdcall QueryPerformanceCounter(__int64 *lpPerformanceCount);
 
 //COM API
 extern "C" __declspec(dllimport) long __stdcall CoInitialize(void *pvReserved);
@@ -866,9 +870,19 @@
                     unsigned long dwCapabilities,
                     void *pReserved3 );
 
+ extern "C" __declspec(dllimport) long __stdcall CoSetProxyBlanket(
+ IUnknown_BIPC *pProxy,
+ unsigned long dwAuthnSvc,
+ unsigned long dwAuthzSvc,
+ wchar_t *pServerPrincName,
+ unsigned long dwAuthnLevel,
+ unsigned long dwImpLevel,
+ void *pAuthInfo,
+ unsigned long dwCapabilities);
+
 extern "C" __declspec(dllimport) long __stdcall VariantClear(wchar_variant * pvarg);
-extern "C" __declspec(dllimport) long __stdcall CoCreateInstance(const GUID_IG & rclsid, IUnknown_IG *pUnkOuter,
- unsigned long dwClsContext, const GUID_IG & riid, void** ppv);
+extern "C" __declspec(dllimport) long __stdcall CoCreateInstance(const GUID_BIPC & rclsid, IUnknown_BIPC *pUnkOuter,
+ unsigned long dwClsContext, const GUID_BIPC & riid, void** ppv);
 extern "C" __declspec(dllimport) void __stdcall CoUninitialize(void);
 
 
@@ -928,6 +942,9 @@
    }
 }
 
+inline void sleep(unsigned long ms)
+{ Sleep(ms); }
+
 inline unsigned long get_current_thread_id()
 { return GetCurrentThreadId(); }
 
@@ -960,19 +977,16 @@
       , lpTargetHandle, 0, 0
       , duplicate_same_access);
 }
-
+/*
 inline void get_system_time_as_file_time(interprocess_filetime *filetime)
 { GetSystemTimeAsFileTime(filetime); }
 
 inline bool file_time_to_local_file_time
    (const interprocess_filetime *in, const interprocess_filetime *out)
 { return 0 != FileTimeToLocalFileTime(in, out); }
-
-inline void *create_mutex(const char *name)
-{ return CreateMutexA(0, 0, name); }
-
-inline void *open_mutex(const char *name)
-{ return OpenMutexA(mutex_all_access, 0, name); }
+*/
+inline void *open_or_create_mutex(const char *name, bool initial_owner, interprocess_security_attributes *attr)
+{ return CreateMutexA(attr, (int)initial_owner, name); }
 
 inline unsigned long wait_for_single_object(void *handle, unsigned long time)
 { return WaitForSingleObject(handle, time); }
@@ -983,15 +997,12 @@
 inline int unmap_view_of_file(void *address)
 { return UnmapViewOfFile(address); }
 
-inline void *create_semaphore(long initialCount, const char *name)
-{ return CreateSemaphoreA(0, initialCount, (long)(((unsigned long)(-1))>>1), name); }
+inline void *open_or_create_semaphore(const char *name, long initial_count, long maximum_count, interprocess_security_attributes *attr)
+{ return CreateSemaphoreA(attr, initial_count, maximum_count, name); }
 
 inline int release_semaphore(void *handle, long release_count, long *prev_count)
 { return ReleaseSemaphore(handle, release_count, prev_count); }
 
-inline void *open_semaphore(const char *name)
-{ return OpenSemaphoreA(semaphore_all_access, 1, name); }
-
 class interprocess_all_access_security
 {
    interprocess_security_attributes sa;
@@ -1136,6 +1147,11 @@
 inline long reg_close_key(void *hKey)
 { return RegCloseKey(hKey); }
 
+inline bool query_performance_counter(__int64 *lpPerformanceCount)
+{
+ return 0 != QueryPerformanceCounter(lpPerformanceCount);
+}
+
 inline void initialize_object_attributes
 ( object_attributes_t *pobject_attr, unicode_string_t *name
  , unsigned long attr, void *rootdir, void *security_descr)
@@ -1181,7 +1197,7 @@
    static void *get_module(const unsigned int id)
    {
       assert(id < (unsigned int)NumModule);
- while(ModuleStates[id] < 2u){
+ while(ModuleStates[id] < 2){
          if(interlocked_compare_exchange(&ModuleStates[id], 1, 0) == 0){
             ModuleAddresses[id] = get_module_from_id(id);
             interlocked_increment(&ModuleStates[id]);
@@ -1207,7 +1223,7 @@
    static void *get(const unsigned int id)
    {
       assert(id < (unsigned int)NumFunction);
- while(FunctionStates[id] < 2u){
+ while(FunctionStates[id] < 2){
          if(interlocked_compare_exchange(&FunctionStates[id], 1, 0) == 0){
             FunctionAddresses[id] = get_address_from_dll(id);
             interlocked_increment(&FunctionStates[id]);
@@ -1600,7 +1616,7 @@
 {
    //See example http://msdn.microsoft.com/en-us/library/aa390423%28v=VS.85%29.aspx
    long co_init_ret = CoInitialize(0);
- if(co_init_ret != S_OK_IG && co_init_ret != S_FALSE_IG)
+ if(co_init_ret != S_OK_BIPC && co_init_ret != S_FALSE_BIPC)
       return false;
    co_uninitializer co_initialize_end;
    (void)co_initialize_end;
@@ -1611,28 +1627,28 @@
       ,-1 //cAuthSvc
       , 0 //asAuthSvc
       , 0 //pReserved1
- , RPC_C_AUTHN_LEVEL_PKT_IG //dwAuthnLevel
- , RPC_C_IMP_LEVEL_IMPERSONATE_IG //dwImpLevel
+ , RPC_C_AUTHN_LEVEL_PKT_BIPC //dwAuthnLevel
+ , RPC_C_IMP_LEVEL_IMPERSONATE_BIPC //dwImpLevel
       , 0 //pAuthList
- , EOAC_NONE_IG //dwCapabilities
+ , EOAC_NONE_BIPC //dwCapabilities
       , 0 //pReserved3
       );
- if( 0 == sec_init_ret || RPC_E_TOO_LATE_IG == sec_init_ret)
+ if( 0 == sec_init_ret || RPC_E_TOO_LATE_BIPC == sec_init_ret)
    {
- IWbemLocator_IG * pIWbemLocator = 0;
+ IWbemLocator_BIPC * pIWbemLocator = 0;
       const wchar_t * bstrNamespace = L"root\\cimv2";
  
       if( 0 != CoCreateInstance(
             CLSID_WbemAdministrativeLocator,
             0,
- CLSCTX_INPROC_SERVER_IG | CLSCTX_LOCAL_SERVER_IG,
+ CLSCTX_INPROC_SERVER_BIPC | CLSCTX_LOCAL_SERVER_BIPC,
             IID_IUnknown, (void **)&pIWbemLocator)){
          return false;
       }
  
- com_releaser<IWbemLocator_IG> IWbemLocator_releaser(pIWbemLocator);
+ com_releaser<IWbemLocator_BIPC> IWbemLocator_releaser(pIWbemLocator);
 
- IWbemServices_IG *pWbemServices = 0;
+ IWbemServices_BIPC *pWbemServices = 0;
 
       if( 0 != pIWbemLocator->ConnectServer(
             bstrNamespace, // Namespace
@@ -1648,7 +1664,21 @@
          return false;
       }
 
- com_releaser<IWbemServices_IG> IWbemServices_releaser(pWbemServices);
+ if( S_OK_BIPC != CoSetProxyBlanket(
+ pWbemServices,
+ RPC_C_AUTHN_DEFAULT_BIPC,
+ RPC_C_AUTHZ_DEFAULT_BIPC,
+ 0,
+ RPC_C_AUTHN_LEVEL_PKT_BIPC,
+ RPC_C_IMP_LEVEL_IMPERSONATE_BIPC,
+ 0,
+ EOAC_NONE_BIPC
+ )
+ ){
+ return false;
+ }
+
+ com_releaser<IWbemServices_BIPC> IWbemServices_releaser(pWbemServices);
 
       strValue.clear();
       strValue += L"Select ";
@@ -1656,13 +1686,13 @@
       strValue += L" from ";
       strValue += wmi_class;
 
- IEnumWbemClassObject_IG * pEnumObject = 0;
+ IEnumWbemClassObject_BIPC * pEnumObject = 0;
 
       if ( 0 != pWbemServices->ExecQuery(
             L"WQL",
             strValue.c_str(),
- //WBEM_FLAG_RETURN_IMMEDIATELY_IG,
- WBEM_FLAG_RETURN_WHEN_COMPLETE_IG | WBEM_FLAG_FORWARD_ONLY_IG,
+ //WBEM_FLAG_RETURN_IMMEDIATELY_BIPC,
+ WBEM_FLAG_RETURN_WHEN_COMPLETE_BIPC | WBEM_FLAG_FORWARD_ONLY_BIPC,
             0,
             &pEnumObject
             )
@@ -1670,19 +1700,19 @@
          return false;
       }
 
- com_releaser<IEnumWbemClassObject_IG> IEnumWbemClassObject_releaser(pEnumObject);
+ com_releaser<IEnumWbemClassObject_BIPC> IEnumWbemClassObject_releaser(pEnumObject);
 
- //WBEM_FLAG_FORWARD_ONLY_IG incompatible with Reset
+ //WBEM_FLAG_FORWARD_ONLY_BIPC incompatible with Reset
       //if ( 0 != pEnumObject->Reset() ){
          //return false;
       //}
 
       wchar_variant vwchar;
       unsigned long uCount = 1, uReturned;
- IWbemClassObject_IG * pClassObject = 0;
- while( 0 == pEnumObject->Next( WBEM_INFINITE_IG, uCount, &pClassObject, &uReturned ) )
+ IWbemClassObject_BIPC * pClassObject = 0;
+ while( 0 == pEnumObject->Next( WBEM_INFINITE_BIPC, uCount, &pClassObject, &uReturned ) )
       {
- com_releaser<IWbemClassObject_IG> IWbemClassObject_releaser(pClassObject);
+ com_releaser<IWbemClassObject_BIPC> IWbemClassObject_releaser(pClassObject);
          if ( 0 == pClassObject->Get( L"LastBootUpTime", 0, &vwchar, 0, 0 ) ){
             bRet = true;
             strValue = vwchar.value.pbstrVal;
@@ -1733,4 +1763,4 @@
 
 #include <boost/interprocess/detail/config_end.hpp>
 
-#endif //#ifdef BOOST_INTERPROCESS_WIN32_SYNC_PRIMITIVES_HPP
+#endif //#ifdef BOOST_INTERPROCESS_WIN32_PRIMITIVES_HPP

Modified: branches/release/boost/interprocess/detail/workaround.hpp
==============================================================================
--- branches/release/boost/interprocess/detail/workaround.hpp (original)
+++ branches/release/boost/interprocess/detail/workaround.hpp 2011-12-26 12:21:36 EST (Mon, 26 Dec 2011)
@@ -1,6 +1,6 @@
 //////////////////////////////////////////////////////////////////////////////
 //
-// (C) Copyright Ion Gaztanaga 2005-2009. Distributed under the Boost
+// (C) Copyright Ion Gaztanaga 2005-2011. 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,7 +25,7 @@
 
 #endif
 
-#if !(defined BOOST_INTERPROCESS_WINDOWS)
+#if !defined(BOOST_INTERPROCESS_WINDOWS)
 
    #include <unistd.h>
 

Modified: branches/release/boost/interprocess/detail/xsi_shared_memory_device.hpp
==============================================================================
--- branches/release/boost/interprocess/detail/xsi_shared_memory_device.hpp (original)
+++ branches/release/boost/interprocess/detail/xsi_shared_memory_device.hpp 2011-12-26 12:21:36 EST (Mon, 26 Dec 2011)
@@ -1,6 +1,6 @@
 //////////////////////////////////////////////////////////////////////////////
 //
-// (C) Copyright Ion Gaztanaga 2009-2010. Distributed under the Boost
+// (C) Copyright Ion Gaztanaga 2009-2011. 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)
 //
@@ -75,7 +75,7 @@
 
    xsi_shared_memory_device &operator=(BOOST_RV_REF(xsi_shared_memory_device) moved)
    {
- xsi_shared_memory_device tmp(boost::interprocess::move(moved));
+ xsi_shared_memory_device tmp(boost::move(moved));
       this->swap(tmp);
       return *this;
    }
@@ -204,8 +204,8 @@
    xsi_shared_memory index_shm(open_or_create, xsi_shm_emulation_file_path.c_str(), 1, MemSize, 0666);
    mapped_region r(index_shm, read_write, 0, MemSize, 0);
    xsi_named_mutex m(open_or_create, xsi_shm_emulation_file_path.c_str(), 2, 0666);
- reg = boost::interprocess::move(r);
- mut = boost::interprocess::move(m);
+ reg = boost::move(r);
+ mut = boost::move(m);
    path.swap(xsi_shm_emulation_file_path);
 }
 
@@ -246,17 +246,17 @@
          throw interprocess_exception(err);
       }
       xsi_shared_memory temp(open_only, filepath, id, perm);
- m_shm = boost::interprocess::move(temp);
+ m_shm = boost::move(temp);
    }
    else if(type == ipcdetail::DoCreate){
       //Try to reuse slot
       xsi_shared_memory temp(create_only, filepath, id, size, perm);
       std::strcpy(info->names[target_entry].buf, shmname);
- m_shm = boost::interprocess::move(temp);
+ m_shm = boost::move(temp);
    }
    else{ // if(type == ipcdetail::DoOpenOrCreate){
       xsi_shared_memory temp(open_or_create, filepath, id, size, perm);
- m_shm = boost::interprocess::move(temp);
+ m_shm = boost::move(temp);
    }
 
    m_mode = mode;
@@ -318,7 +318,7 @@
          }
          xsi_shared_memory temp( open_only, xsi_shm_emulation_file_path.c_str()
                                , target_entry+info_constants_t<0>::FirstID, perm);
- m_shm = boost::interprocess::move(temp);
+ m_shm = boost::move(temp);
       }
       else{
 
@@ -327,7 +327,7 @@
             xsi_shared_memory temp( create_only, xsi_shm_emulation_file_path.c_str()
                                   , target_entry+info_constants_t<0>::FirstID, size, perm);
             std::strcpy(info->names[target_entry].buf, shmname);
- m_shm = boost::interprocess::move(temp);
+ m_shm = boost::move(temp);
          }
          else{ // if(type == ipcdetail::DoOpenOrCreate){
             xsi_shared_memory temp( open_or_create, xsi_shm_emulation_file_path.c_str()
@@ -336,7 +336,7 @@
                std::memset(info->names[target_entry].buf, 0, info_constants_t<0>::MaxName);
                std::strcpy(info->names[target_entry].buf, shmname);
             }
- m_shm = boost::interprocess::move(temp);
+ m_shm = boost::move(temp);
          }
       }
    }

Modified: branches/release/boost/interprocess/detail/xsi_shared_memory_file_wrapper.hpp
==============================================================================
--- branches/release/boost/interprocess/detail/xsi_shared_memory_file_wrapper.hpp (original)
+++ branches/release/boost/interprocess/detail/xsi_shared_memory_file_wrapper.hpp 2011-12-26 12:21:36 EST (Mon, 26 Dec 2011)
@@ -1,6 +1,6 @@
 //////////////////////////////////////////////////////////////////////////////
 //
-// (C) Copyright Ion Gaztanaga 2009-2010. Distributed under the Boost
+// (C) Copyright Ion Gaztanaga 2009-2011. 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)
 //
@@ -62,7 +62,7 @@
 
    xsi_shared_memory_file_wrapper &operator=(BOOST_RV_REF(xsi_shared_memory_file_wrapper) moved)
    {
- xsi_shared_memory_file_wrapper tmp(boost::interprocess::move(moved));
+ xsi_shared_memory_file_wrapper tmp(boost::move(moved));
       this->swap(tmp);
       return *this;
    }

Modified: branches/release/boost/interprocess/errors.hpp
==============================================================================
--- branches/release/boost/interprocess/errors.hpp (original)
+++ branches/release/boost/interprocess/errors.hpp 2011-12-26 12:21:36 EST (Mon, 26 Dec 2011)
@@ -1,6 +1,6 @@
 //////////////////////////////////////////////////////////////////////////////
 //
-// (C) Copyright Ion Gaztanaga 2005-2009. Distributed under the Boost
+// (C) Copyright Ion Gaztanaga 2005-2011. 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)
 //
@@ -114,6 +114,7 @@
    not_such_file_or_directory,
    invalid_argument,
    timeout_when_locking_error,
+ timeout_when_waiting_error,
 };
 
 typedef int native_error_t;

Modified: branches/release/boost/interprocess/exceptions.hpp
==============================================================================
--- branches/release/boost/interprocess/exceptions.hpp (original)
+++ branches/release/boost/interprocess/exceptions.hpp 2011-12-26 12:21:36 EST (Mon, 26 Dec 2011)
@@ -1,6 +1,6 @@
 //////////////////////////////////////////////////////////////////////////////
 //
-// (C) Copyright Ion Gaztanaga 2005-2009. Distributed under the Boost
+// (C) Copyright Ion Gaztanaga 2005-2011. 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)
 //

Modified: branches/release/boost/interprocess/file_mapping.hpp
==============================================================================
--- branches/release/boost/interprocess/file_mapping.hpp (original)
+++ branches/release/boost/interprocess/file_mapping.hpp 2011-12-26 12:21:36 EST (Mon, 26 Dec 2011)
@@ -1,6 +1,6 @@
 //////////////////////////////////////////////////////////////////////////////
 //
-// (C) Copyright Ion Gaztanaga 2005-2009. Distributed under the Boost
+// (C) Copyright Ion Gaztanaga 2005-2011. 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)
 //
@@ -19,7 +19,7 @@
 #include <boost/interprocess/detail/utilities.hpp>
 #include <boost/interprocess/creation_tags.hpp>
 #include <boost/interprocess/detail/os_file_functions.hpp>
-#include <boost/interprocess/detail/move.hpp>
+#include <boost/move/move.hpp>
 #include <string> //std::string
 
 //!\file
@@ -59,7 +59,7 @@
    //!Does not throw
    file_mapping &operator=(BOOST_RV_REF(file_mapping) moved)
    {
- file_mapping tmp(boost::interprocess::move(moved));
+ file_mapping tmp(boost::move(moved));
       this->swap(tmp);
       return *this;
    }

Modified: branches/release/boost/interprocess/indexes/flat_map_index.hpp
==============================================================================
--- branches/release/boost/interprocess/indexes/flat_map_index.hpp (original)
+++ branches/release/boost/interprocess/indexes/flat_map_index.hpp 2011-12-26 12:21:36 EST (Mon, 26 Dec 2011)
@@ -1,6 +1,6 @@
 //////////////////////////////////////////////////////////////////////////////
 //
-// (C) Copyright Ion Gaztanaga 2005-2009. Distributed under the Boost
+// (C) Copyright Ion Gaztanaga 2005-2011. 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)
 //

Modified: branches/release/boost/interprocess/indexes/iset_index.hpp
==============================================================================
--- branches/release/boost/interprocess/indexes/iset_index.hpp (original)
+++ branches/release/boost/interprocess/indexes/iset_index.hpp 2011-12-26 12:21:36 EST (Mon, 26 Dec 2011)
@@ -1,6 +1,6 @@
 //////////////////////////////////////////////////////////////////////////////
 //
-// (C) Copyright Ion Gaztanaga 2005-2009. Distributed under the Boost
+// (C) Copyright Ion Gaztanaga 2005-2011. 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)
 //
@@ -138,7 +138,7 @@
 struct is_intrusive_index
    <boost::interprocess::iset_index<MapConfig> >
 {
- enum{ value = true };
+ static const bool value = true;
 };
 /// @endcond
 

Modified: branches/release/boost/interprocess/indexes/iunordered_set_index.hpp
==============================================================================
--- branches/release/boost/interprocess/indexes/iunordered_set_index.hpp (original)
+++ branches/release/boost/interprocess/indexes/iunordered_set_index.hpp 2011-12-26 12:21:36 EST (Mon, 26 Dec 2011)
@@ -1,6 +1,6 @@
 //////////////////////////////////////////////////////////////////////////////
 //
-// (C) Copyright Ion Gaztanaga 2005-2009. Distributed under the Boost
+// (C) Copyright Ion Gaztanaga 2005-2011. 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)
 //
@@ -16,7 +16,7 @@
 
 #include <functional>
 #include <utility>
-#include <boost/get_pointer.hpp>
+
 #include <boost/interprocess/detail/utilities.hpp>
 #include <boost/interprocess/containers/vector.hpp>
 #include <boost/intrusive/unordered_set.hpp>
@@ -84,7 +84,7 @@
     {
         std::size_t operator()(const value_type &val) const
         {
- const char_type *beg = ipcdetail::get_pointer(val.name()),
+ const char_type *beg = ipcdetail::to_raw_pointer(val.name()),
                             *end = beg + val.name_length();
             return boost::hash_range(beg, end);
         }
@@ -156,7 +156,7 @@
    typedef typename index_aux::
       segment_manager_base segment_manager_base;
 
- enum { InitBufferSize = 64};
+ static const std::size_t InitBufferSize = 64;
 
    static bucket_ptr create_buckets(allocator_type &alloc, size_type num)
    {
@@ -164,7 +164,7 @@
       bucket_ptr buckets = alloc.allocate(num);
       bucket_ptr buckets_init = buckets;
       for(size_type i = 0; i < num; ++i){
- new(get_pointer(buckets_init++))bucket_type();
+ new(to_raw_pointer(buckets_init++))bucket_type();
       }
       return buckets;
    }
@@ -181,8 +181,8 @@
          return old_size;
       }
 
- for( bucket_type *p = ipcdetail::get_pointer(buckets) + received_size
- , *pend = ipcdetail::get_pointer(buckets) + old_size
+ for( bucket_type *p = ipcdetail::to_raw_pointer(buckets) + received_size
+ , *pend = ipcdetail::to_raw_pointer(buckets) + old_size
          ; p != pend
          ; ++p){
          p->~bucket_type();
@@ -194,7 +194,7 @@
 
       bucket_ptr buckets_init = buckets + received_size;
       for(size_type i = 0; i < (old_size - received_size); ++i){
- get_pointer(buckets_init++)->~bucket_type();
+ to_raw_pointer(buckets_init++)->~bucket_type();
       }
       return received_size;
    }
@@ -210,13 +210,13 @@
       if(ret.first == old_buckets){
          bucket_ptr buckets_init = old_buckets + old_num;
          for(size_type i = 0; i < (new_num - old_num); ++i){
- new(get_pointer(buckets_init++))bucket_type();
+ new(to_raw_pointer(buckets_init++))bucket_type();
          }
       }
       else{
          bucket_ptr buckets_init = ret.first;
          for(size_type i = 0; i < new_num; ++i){
- new(get_pointer(buckets_init++))bucket_type();
+ new(to_raw_pointer(buckets_init++))bucket_type();
          }
       }
 
@@ -228,7 +228,7 @@
    {
       bucket_ptr buckets_destroy = buckets;
       for(size_type i = 0; i < num; ++i){
- get_pointer(buckets_destroy++)->~bucket_type();
+ to_raw_pointer(buckets_destroy++)->~bucket_type();
       }
       alloc.deallocate(buckets, num);
    }
@@ -357,7 +357,7 @@
 struct is_intrusive_index
    <boost::interprocess::iunordered_set_index<MapConfig> >
 {
- enum{ value = true };
+ static const bool value = true;
 };
 /// @endcond
 

Modified: branches/release/boost/interprocess/indexes/map_index.hpp
==============================================================================
--- branches/release/boost/interprocess/indexes/map_index.hpp (original)
+++ branches/release/boost/interprocess/indexes/map_index.hpp 2011-12-26 12:21:36 EST (Mon, 26 Dec 2011)
@@ -1,6 +1,6 @@
 //////////////////////////////////////////////////////////////////////////////
 //
-// (C) Copyright Ion Gaztanaga 2005-2009. Distributed under the Boost
+// (C) Copyright Ion Gaztanaga 2005-2011. 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)
 //
@@ -89,7 +89,7 @@
 struct is_node_index
    <boost::interprocess::map_index<MapConfig> >
 {
- enum { value = true };
+ static const bool value = true;
 };
 /// @endcond
 

Modified: branches/release/boost/interprocess/indexes/null_index.hpp
==============================================================================
--- branches/release/boost/interprocess/indexes/null_index.hpp (original)
+++ branches/release/boost/interprocess/indexes/null_index.hpp 2011-12-26 12:21:36 EST (Mon, 26 Dec 2011)
@@ -1,6 +1,6 @@
 //////////////////////////////////////////////////////////////////////////////
 //
-// (C) Copyright Ion Gaztanaga 2005-2009. Distributed under the Boost
+// (C) Copyright Ion Gaztanaga 2005-2011. 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)
 //

Modified: branches/release/boost/interprocess/indexes/unordered_map_index.hpp
==============================================================================
--- branches/release/boost/interprocess/indexes/unordered_map_index.hpp (original)
+++ branches/release/boost/interprocess/indexes/unordered_map_index.hpp 2011-12-26 12:21:36 EST (Mon, 26 Dec 2011)
@@ -1,6 +1,6 @@
 //////////////////////////////////////////////////////////////////////////////
 //
-// (C) Copyright Ion Gaztanaga 2005-2009. Distributed under the Boost
+// (C) Copyright Ion Gaztanaga 2005-2011. 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)
 //
@@ -48,7 +48,7 @@
         std::size_t operator()(const key_type &val) const
         {
             typedef typename key_type::char_type char_type;
- const char_type *beg = ipcdetail::get_pointer(val.mp_str),
+ const char_type *beg = ipcdetail::to_raw_pointer(val.mp_str),
                             *end = beg + val.m_len;
             return boost::hash_range(beg, end);
         }
@@ -102,7 +102,7 @@
 struct is_node_index
    <boost::interprocess::unordered_map_index<MapConfig> >
 {
- enum { value = true };
+ static const bool value = true;
 };
 /// @endcond
 

Modified: branches/release/boost/interprocess/interprocess_fwd.hpp
==============================================================================
--- branches/release/boost/interprocess/interprocess_fwd.hpp (original)
+++ branches/release/boost/interprocess/interprocess_fwd.hpp 2011-12-26 12:21:36 EST (Mon, 26 Dec 2011)
@@ -1,6 +1,6 @@
 //////////////////////////////////////////////////////////////////////////////
 //
-// (C) Copyright Ion Gaztanaga 2005-2009. Distributed under the Boost
+// (C) Copyright Ion Gaztanaga 2005-2011. 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)
 //
@@ -35,32 +35,11 @@
 namespace bi = boost::intrusive;
 }}
 
-#ifndef _LIBCPP_VERSION
-
-namespace std {
-
-template <class T>
-class allocator;
-
-template <class T>
-struct less;
-
-template <class T1, class T2>
-struct pair;
-
-template <class CharType>
-struct char_traits;
-
-} //namespace std {
-
-#else
-
-#include <utility>
-#include <memory>
-#include <functional>
-#include <iosfwd>
-
-#endif
+#include <utility>
+#include <memory>
+#include <functional>
+#include <iosfwd>
+#include <string>
 
 /// @endcond
 

Modified: branches/release/boost/interprocess/ipc/message_queue.hpp
==============================================================================
--- branches/release/boost/interprocess/ipc/message_queue.hpp (original)
+++ branches/release/boost/interprocess/ipc/message_queue.hpp 2011-12-26 12:21:36 EST (Mon, 26 Dec 2011)
@@ -1,6 +1,6 @@
 //////////////////////////////////////////////////////////////////////////////
 //
-// (C) Copyright Ion Gaztanaga 2005-2009. Distributed under the Boost
+// (C) Copyright Ion Gaztanaga 2005-2011. 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)
 //
@@ -28,6 +28,7 @@
 #include <boost/pointer_to_other.hpp>
 #include <boost/type_traits/make_unsigned.hpp>
 #include <boost/type_traits/alignment_of.hpp>
+#include <boost/intrusive/pointer_traits.hpp>
 #include <algorithm> //std::lower_bound
 #include <cstddef> //std::size_t
 #include <cstring> //memcpy
@@ -55,7 +56,7 @@
    public:
    typedef VoidPointer void_pointer;
    typedef typename boost::pointer_to_other<void_pointer, char>::type char_ptr;
- typedef typename std::iterator_traits<char_ptr>::difference_type difference_type;
+ typedef typename boost::intrusive::pointer_traits<char_ptr>::difference_type difference_type;
    typedef typename boost::make_unsigned<difference_type>::type size_type;
 
    //!Creates a process shared message queue with name "name". For this message queue,
@@ -79,7 +80,7 @@
                  const permissions &perm = permissions());
 
    //!Opens a previously created process shared message queue with name "name".
- //!If the was not previously created or there are no free resources,
+ //!If the queue was not previously created or there are no free resources,
    //!throws an error.
    message_queue_t(open_only_t open_only,
                  const char *name);
@@ -185,11 +186,11 @@
 template<class VoidPointer>
 class msg_hdr_t
 {
- typedef VoidPointer void_pointer;
+ typedef VoidPointer void_pointer;
    typedef typename boost::
- pointer_to_other<VoidPointer, char>::type char_ptr;
- typedef typename std::iterator_traits<char_ptr>::difference_type difference_type;
- typedef typename boost::make_unsigned<difference_type>::type size_type;
+ pointer_to_other<VoidPointer, char>::type char_ptr;
+ typedef typename boost::intrusive::pointer_traits<char_ptr>::difference_type difference_type;
+ typedef typename boost::make_unsigned<difference_type>::type size_type;
 
    public:
    size_type len; // Message length
@@ -247,12 +248,13 @@
 class mq_hdr_t
    : public ipcdetail::priority_functor<VoidPointer>
 {
- typedef VoidPointer void_pointer;
- typedef msg_hdr_t<void_pointer> msg_header;
+ typedef VoidPointer void_pointer;
+ typedef msg_hdr_t<void_pointer> msg_header;
    typedef typename boost::
- pointer_to_other<void_pointer, msg_header>::type msg_hdr_ptr_t;
- typedef typename std::iterator_traits<msg_hdr_ptr_t>::difference_type difference_type;
- typedef typename boost::make_unsigned<difference_type>::type size_type;
+ pointer_to_other<void_pointer, msg_header>::type msg_hdr_ptr_t;
+ typedef typename boost::intrusive::pointer_traits
+ <msg_hdr_ptr_t>::difference_type difference_type;
+ typedef typename boost::make_unsigned<difference_type>::type size_type;
    typedef typename boost::
       pointer_to_other<void_pointer, msg_hdr_ptr_t>::type msg_hdr_ptr_ptr_t;
 
@@ -374,7 +376,7 @@
 {
    public:
    typedef typename boost::pointer_to_other<VoidPointer, char>::type char_ptr;
- typedef typename std::iterator_traits<char_ptr>::difference_type difference_type;
+ typedef typename boost::intrusive::pointer_traits<char_ptr>::difference_type difference_type;
    typedef typename boost::make_unsigned<difference_type>::type size_type;
 
    initialization_func_t(size_type maxmsg = 0,

Modified: branches/release/boost/interprocess/managed_heap_memory.hpp
==============================================================================
--- branches/release/boost/interprocess/managed_heap_memory.hpp (original)
+++ branches/release/boost/interprocess/managed_heap_memory.hpp 2011-12-26 12:21:36 EST (Mon, 26 Dec 2011)
@@ -1,6 +1,6 @@
 //////////////////////////////////////////////////////////////////////////////
 //
-// (C) Copyright Ion Gaztanaga 2005-2009. Distributed under the Boost
+// (C) Copyright Ion Gaztanaga 2005-2011. 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)
 //
@@ -18,10 +18,15 @@
 #include <boost/interprocess/detail/config_begin.hpp>
 #include <boost/interprocess/detail/workaround.hpp>
 #include <boost/interprocess/creation_tags.hpp>
-#include <boost/interprocess/detail/move.hpp>
+#include <boost/move/move.hpp>
 #include <vector>
 #include <boost/interprocess/detail/managed_memory_impl.hpp>
 #include <boost/detail/no_exceptions_support.hpp>
+//These includes needed to fulfill default template parameters of
+//predeclarations in interprocess_fwd.hpp
+#include <boost/interprocess/mem_algo/rbtree_best_fit.hpp>
+#include <boost/interprocess/sync/mutex_family.hpp>
+#include <boost/interprocess/indexes/iset_index.hpp>
 
 //!\file
 //!Describes a named heap memory allocation user class.
@@ -79,7 +84,7 @@
    //!Moves the ownership of "moved"'s managed memory to *this. Does not throw
    basic_managed_heap_memory &operator=(BOOST_RV_REF(basic_managed_heap_memory) moved)
    {
- basic_managed_heap_memory tmp(boost::interprocess::move(moved));
+ basic_managed_heap_memory tmp(boost::move(moved));
       this->swap(tmp);
       return *this;
    }

Modified: branches/release/boost/interprocess/managed_mapped_file.hpp
==============================================================================
--- branches/release/boost/interprocess/managed_mapped_file.hpp (original)
+++ branches/release/boost/interprocess/managed_mapped_file.hpp 2011-12-26 12:21:36 EST (Mon, 26 Dec 2011)
@@ -1,6 +1,6 @@
 //////////////////////////////////////////////////////////////////////////////
 //
-// (C) Copyright Ion Gaztanaga 2005-2009. Distributed under the Boost
+// (C) Copyright Ion Gaztanaga 2005-2011. 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,9 +21,14 @@
 #include <boost/interprocess/detail/managed_memory_impl.hpp>
 #include <boost/interprocess/creation_tags.hpp>
 #include <boost/interprocess/detail/file_wrapper.hpp>
-#include <boost/interprocess/detail/move.hpp>
+#include <boost/move/move.hpp>
 #include <boost/interprocess/file_mapping.hpp>
 #include <boost/interprocess/permissions.hpp>
+//These includes needed to fulfill default template parameters of
+//predeclarations in interprocess_fwd.hpp
+#include <boost/interprocess/mem_algo/rbtree_best_fit.hpp>
+#include <boost/interprocess/sync/mutex_family.hpp>
+#include <boost/interprocess/indexes/iset_index.hpp>
 
 namespace boost {
 namespace interprocess {
@@ -40,20 +45,25 @@
 class basic_managed_mapped_file
    : public ipcdetail::basic_managed_memory_impl
       <CharType, AllocationAlgorithm, IndexType
- ,ipcdetail::managed_open_or_create_impl<ipcdetail::file_wrapper>::ManagedOpenOrCreateUserOffset>
+ ,ipcdetail::managed_open_or_create_impl< ipcdetail::file_wrapper
+ , AllocationAlgorithm::Alignment>::ManagedOpenOrCreateUserOffset
+ >
 {
    /// @cond
    public:
    typedef ipcdetail::basic_managed_memory_impl
       <CharType, AllocationAlgorithm, IndexType,
- ipcdetail::managed_open_or_create_impl<ipcdetail::file_wrapper>::ManagedOpenOrCreateUserOffset> base_t;
+ ipcdetail::managed_open_or_create_impl
+ <ipcdetail::file_wrapper, AllocationAlgorithm::Alignment>::ManagedOpenOrCreateUserOffset
+ > base_t;
    typedef ipcdetail::file_wrapper device_type;
    typedef typename base_t::size_type size_type;
 
    private:
 
    typedef ipcdetail::create_open_func<base_t> create_open_func_t;
- typedef ipcdetail::managed_open_or_create_impl<ipcdetail::file_wrapper> managed_open_or_create_type;
+ typedef ipcdetail::managed_open_or_create_impl< ipcdetail::file_wrapper
+ , AllocationAlgorithm::Alignment> managed_open_or_create_type;
 
    basic_managed_mapped_file *get_this_pointer()
    { return this; }
@@ -130,7 +140,7 @@
    //!Does not throw
    basic_managed_mapped_file &operator=(BOOST_RV_REF(basic_managed_mapped_file) moved)
    {
- basic_managed_mapped_file tmp(boost::interprocess::move(moved));
+ basic_managed_mapped_file tmp(boost::move(moved));
       this->swap(tmp);
       return *this;
    }

Modified: branches/release/boost/interprocess/managed_shared_memory.hpp
==============================================================================
--- branches/release/boost/interprocess/managed_shared_memory.hpp (original)
+++ branches/release/boost/interprocess/managed_shared_memory.hpp 2011-12-26 12:21:36 EST (Mon, 26 Dec 2011)
@@ -1,6 +1,6 @@
 //////////////////////////////////////////////////////////////////////////////
 //
-// (C) Copyright Ion Gaztanaga 2005-2009. Distributed under the Boost
+// (C) Copyright Ion Gaztanaga 2005-2011. 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)
 //
@@ -19,11 +19,14 @@
 #include <boost/interprocess/detail/workaround.hpp>
 
 #include <boost/interprocess/detail/managed_memory_impl.hpp>
-#include <boost/interprocess/exceptions.hpp>
 #include <boost/interprocess/detail/managed_open_or_create_impl.hpp>
 #include <boost/interprocess/shared_memory_object.hpp>
 #include <boost/interprocess/creation_tags.hpp>
 #include <boost/interprocess/permissions.hpp>
+//These includes needed to fulfill default template parameters of
+//predeclarations in interprocess_fwd.hpp
+#include <boost/interprocess/mem_algo/rbtree_best_fit.hpp>
+#include <boost/interprocess/sync/mutex_family.hpp>
 
 namespace boost {
 
@@ -41,15 +44,18 @@
 class basic_managed_shared_memory
    : public ipcdetail::basic_managed_memory_impl
       <CharType, AllocationAlgorithm, IndexType
- ,ipcdetail::managed_open_or_create_impl<shared_memory_object>::ManagedOpenOrCreateUserOffset>
- , private ipcdetail::managed_open_or_create_impl<shared_memory_object>
+ ,ipcdetail::managed_open_or_create_impl<shared_memory_object
+ , AllocationAlgorithm::Alignment>::ManagedOpenOrCreateUserOffset>
+ , private ipcdetail::managed_open_or_create_impl<shared_memory_object
+ , AllocationAlgorithm::Alignment>
 {
    /// @cond
    typedef ipcdetail::basic_managed_memory_impl
       <CharType, AllocationAlgorithm, IndexType,
- ipcdetail::managed_open_or_create_impl<shared_memory_object>::ManagedOpenOrCreateUserOffset> base_t;
+ ipcdetail::managed_open_or_create_impl
+ < shared_memory_object, AllocationAlgorithm::Alignment>::ManagedOpenOrCreateUserOffset> base_t;
    typedef ipcdetail::managed_open_or_create_impl
- <shared_memory_object> base2_t;
+ <shared_memory_object, AllocationAlgorithm::Alignment> base2_t;
 
    typedef ipcdetail::create_open_func<base_t> create_open_func_t;
 
@@ -148,7 +154,7 @@
    //!Does not throw
    basic_managed_shared_memory &operator=(BOOST_RV_REF(basic_managed_shared_memory) moved)
    {
- basic_managed_shared_memory tmp(boost::interprocess::move(moved));
+ basic_managed_shared_memory tmp(boost::move(moved));
       this->swap(tmp);
       return *this;
    }

Modified: branches/release/boost/interprocess/managed_windows_shared_memory.hpp
==============================================================================
--- branches/release/boost/interprocess/managed_windows_shared_memory.hpp (original)
+++ branches/release/boost/interprocess/managed_windows_shared_memory.hpp 2011-12-26 12:21:36 EST (Mon, 26 Dec 2011)
@@ -1,6 +1,6 @@
 //////////////////////////////////////////////////////////////////////////////
 //
-// (C) Copyright Ion Gaztanaga 2005-2009. Distributed under the Boost
+// (C) Copyright Ion Gaztanaga 2005-2011. 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)
 //
@@ -22,7 +22,12 @@
 #include <boost/interprocess/creation_tags.hpp>
 #include <boost/interprocess/windows_shared_memory.hpp>
 #include <boost/interprocess/permissions.hpp>
-#include <boost/interprocess/detail/move.hpp>
+#include <boost/move/move.hpp>
+//These includes needed to fulfill default template parameters of
+//predeclarations in interprocess_fwd.hpp
+#include <boost/interprocess/mem_algo/rbtree_best_fit.hpp>
+#include <boost/interprocess/sync/mutex_family.hpp>
+#include <boost/interprocess/indexes/iset_index.hpp>
 
 namespace boost {
 namespace interprocess {
@@ -46,14 +51,19 @@
>
 class basic_managed_windows_shared_memory
    : public ipcdetail::basic_managed_memory_impl
- <CharType, AllocationAlgorithm, IndexType
- ,ipcdetail::managed_open_or_create_impl<windows_shared_memory>::ManagedOpenOrCreateUserOffset>
+ < CharType, AllocationAlgorithm, IndexType
+ , ipcdetail::managed_open_or_create_impl
+ < windows_shared_memory
+ , AllocationAlgorithm::Alignment
+ , false>::ManagedOpenOrCreateUserOffset
+ >
 {
    /// @cond
    private:
    typedef ipcdetail::basic_managed_memory_impl
       <CharType, AllocationAlgorithm, IndexType,
- ipcdetail::managed_open_or_create_impl<windows_shared_memory>::ManagedOpenOrCreateUserOffset> base_t;
+ ipcdetail::managed_open_or_create_impl
+ <windows_shared_memory, AllocationAlgorithm::Alignment, false>::ManagedOpenOrCreateUserOffset> base_t;
    typedef ipcdetail::create_open_func<base_t> create_open_func_t;
 
    basic_managed_windows_shared_memory *get_this_pointer()
@@ -133,7 +143,7 @@
    //!Does not throw
    basic_managed_windows_shared_memory &operator=(BOOST_RV_REF(basic_managed_windows_shared_memory) moved)
    {
- basic_managed_windows_shared_memory tmp(boost::interprocess::move(moved));
+ basic_managed_windows_shared_memory tmp(boost::move(moved));
       this->swap(tmp);
       return *this;
    }
@@ -171,7 +181,8 @@
    }
 
    private:
- ipcdetail::managed_open_or_create_impl<windows_shared_memory, false> m_wshm;
+ ipcdetail::managed_open_or_create_impl< windows_shared_memory
+ , AllocationAlgorithm::Alignment, false> m_wshm;
    /// @endcond
 };
 

Modified: branches/release/boost/interprocess/managed_xsi_shared_memory.hpp
==============================================================================
--- branches/release/boost/interprocess/managed_xsi_shared_memory.hpp (original)
+++ branches/release/boost/interprocess/managed_xsi_shared_memory.hpp 2011-12-26 12:21:36 EST (Mon, 26 Dec 2011)
@@ -1,6 +1,6 @@
 //////////////////////////////////////////////////////////////////////////////
 //
-// (C) Copyright Ion Gaztanaga 2008-2009. Distributed under the Boost
+// (C) Copyright Ion Gaztanaga 2008-2011. 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)
 //
@@ -26,6 +26,11 @@
 #include <boost/interprocess/detail/managed_open_or_create_impl.hpp>
 #include <boost/interprocess/detail/xsi_shared_memory_file_wrapper.hpp>
 #include <boost/interprocess/creation_tags.hpp>
+//These includes needed to fulfill default template parameters of
+//predeclarations in interprocess_fwd.hpp
+#include <boost/interprocess/mem_algo/rbtree_best_fit.hpp>
+#include <boost/interprocess/sync/mutex_family.hpp>
+#include <boost/interprocess/indexes/iset_index.hpp>
 
 namespace boost {
 
@@ -43,8 +48,11 @@
 class basic_managed_xsi_shared_memory
    : public ipcdetail::basic_managed_memory_impl
       <CharType, AllocationAlgorithm, IndexType
- ,ipcdetail::managed_open_or_create_impl<xsi_shared_memory_file_wrapper, false, true>::ManagedOpenOrCreateUserOffset>
- , private ipcdetail::managed_open_or_create_impl<xsi_shared_memory_file_wrapper, false, true>
+ ,ipcdetail::managed_open_or_create_impl
+ < xsi_shared_memory_file_wrapper, AllocationAlgorithm::Alignment
+ , false, true>::ManagedOpenOrCreateUserOffset>
+ , private ipcdetail::managed_open_or_create_impl
+ <xsi_shared_memory_file_wrapper, AllocationAlgorithm::Alignment, false, true>
 {
    /// @cond
    public:
@@ -52,7 +60,7 @@
 
    public:
    typedef ipcdetail::managed_open_or_create_impl
- <xsi_shared_memory_file_wrapper, false, true> base2_t;
+ <xsi_shared_memory_file_wrapper, AllocationAlgorithm::Alignment, false, true> base2_t;
    typedef ipcdetail::basic_managed_memory_impl
       <CharType, AllocationAlgorithm, IndexType,
       base2_t::ManagedOpenOrCreateUserOffset> base_t;
@@ -140,7 +148,7 @@
    //!Does not throw
    basic_managed_xsi_shared_memory &operator=(BOOST_RV_REF(basic_managed_xsi_shared_memory) moved)
    {
- basic_managed_xsi_shared_memory tmp(boost::interprocess::move(moved));
+ basic_managed_xsi_shared_memory tmp(boost::move(moved));
       this->swap(tmp);
       return *this;
    }

Modified: branches/release/boost/interprocess/mapped_region.hpp
==============================================================================
--- branches/release/boost/interprocess/mapped_region.hpp (original)
+++ branches/release/boost/interprocess/mapped_region.hpp 2011-12-26 12:21:36 EST (Mon, 26 Dec 2011)
@@ -1,6 +1,6 @@
 //////////////////////////////////////////////////////////////////////////////
 //
-// (C) Copyright Ion Gaztanaga 2005-2009. Distributed under the Boost
+// (C) Copyright Ion Gaztanaga 2005-2011. 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)
 //
@@ -16,7 +16,7 @@
 
 #include <boost/interprocess/interprocess_fwd.hpp>
 #include <boost/interprocess/exceptions.hpp>
-#include <boost/interprocess/detail/move.hpp>
+#include <boost/move/move.hpp>
 #include <boost/interprocess/detail/utilities.hpp>
 #include <boost/interprocess/detail/os_file_functions.hpp>
 #include <string>
@@ -75,7 +75,8 @@
                 ,std::size_t size = 0
                 ,const void *address = 0);
 
- //!Default constructor. Address and size and offset will be 0.
+ //!Default constructor. Address will be invalid_address().
+ //!Size and offset will be 0.
    //!Does not throw
    mapped_region();
 
@@ -92,7 +93,6 @@
    #endif
    { this->swap(other); }
 
-
    //!Destroys the mapped region.
    //!Does not throw
    ~mapped_region();
@@ -101,7 +101,7 @@
    //!destroyed and it will take ownership of "other"'s memory mapped region.
    mapped_region &operator=(BOOST_RV_REF(mapped_region) other)
    {
- mapped_region tmp(boost::interprocess::move(other));
+ mapped_region tmp(boost::move(other));
       this->swap(tmp);
       return *this;
    }
@@ -123,6 +123,10 @@
    //!Never throws.
    mode_t get_mode() const;
 
+ //!Returns the value that represents an invalid mapping address
+ //!Never throws.
+ static void* invalid_address();
+
    //!Flushes to the disk a byte range within the mapped memory.
    //!Never throws
    bool flush(std::size_t mapping_offset = 0, std::size_t numbytes = 0);
@@ -371,6 +375,9 @@
    #endif
 }
 
+inline void* mapped_region::invalid_address()
+{ return 0; }
+
 inline void mapped_region::dont_close_on_destruction()
 {}
 
@@ -560,6 +567,9 @@
    }
 }
 
+inline void* mapped_region::invalid_address()
+{ return MAP_FAILED; }
+
 inline void mapped_region::dont_close_on_destruction()
 { m_base = MAP_FAILED; }
 

Modified: branches/release/boost/interprocess/mem_algo/detail/mem_algo_common.hpp
==============================================================================
--- branches/release/boost/interprocess/mem_algo/detail/mem_algo_common.hpp (original)
+++ branches/release/boost/interprocess/mem_algo/detail/mem_algo_common.hpp 2011-12-26 12:21:36 EST (Mon, 26 Dec 2011)
@@ -1,6 +1,6 @@
 //////////////////////////////////////////////////////////////////////////////
 //
-// (C) Copyright Ion Gaztanaga 2005-2009. Distributed under the Boost
+// (C) Copyright Ion Gaztanaga 2005-2011. 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)
 //
@@ -24,7 +24,7 @@
 #include <boost/interprocess/detail/type_traits.hpp>
 #include <boost/interprocess/detail/math_functions.hpp>
 #include <boost/interprocess/detail/utilities.hpp>
-#include <boost/interprocess/detail/move.hpp>
+#include <boost/move/move.hpp>
 #include <boost/interprocess/detail/min_max.hpp>
 #include <boost/assert.hpp>
 #include <boost/static_assert.hpp>
@@ -73,13 +73,13 @@
    { return (((std::size_t)ptr) % Alignment == 0); }
 
    static size_type ceil_units(size_type size)
- { return ipcdetail::get_rounded_size(size, Alignment)/Alignment; }
+ { return get_rounded_size(size, Alignment)/Alignment; }
 
    static size_type floor_units(size_type size)
    { return size/Alignment; }
 
    static size_type multiple_of_units(size_type size)
- { return ipcdetail::get_rounded_size(size, Alignment); }
+ { return get_rounded_size(size, Alignment); }
 
    static multiallocation_chain allocate_many
       (MemoryAlgorithm *memory_algo, size_type elem_bytes, size_type n_elements)
@@ -89,19 +89,19 @@
 
    static void deallocate_many(MemoryAlgorithm *memory_algo, multiallocation_chain chain)
    {
- return this_type::priv_deallocate_many(memory_algo, boost::interprocess::move(chain));
+ return this_type::priv_deallocate_many(memory_algo, boost::move(chain));
    }
 
    static bool calculate_lcm_and_needs_backwards_lcmed
       (size_type backwards_multiple, size_type received_size, size_type size_to_achieve,
       size_type &lcm_out, size_type &needs_backwards_lcmed_out)
    {
- // Now calculate lcm
+ // Now calculate lcm_val
       size_type max = backwards_multiple;
       size_type min = Alignment;
       size_type needs_backwards;
       size_type needs_backwards_lcmed;
- size_type lcm;
+ size_type lcm_val;
       size_type current_forward;
       //Swap if necessary
       if(max < min){
@@ -115,47 +115,47 @@
             return false;
          }
 
- lcm = max;
+ lcm_val = max;
          //If we want to use minbytes data to get a buffer between maxbytes
          //and minbytes if maxbytes can't be achieved, calculate the
          //biggest of all possibilities
- current_forward = ipcdetail::get_truncated_size_po2(received_size, backwards_multiple);
+ current_forward = get_truncated_size_po2(received_size, backwards_multiple);
          needs_backwards = size_to_achieve - current_forward;
          BOOST_ASSERT((needs_backwards % backwards_multiple) == 0);
- needs_backwards_lcmed = ipcdetail::get_rounded_size_po2(needs_backwards, lcm);
- lcm_out = lcm;
+ needs_backwards_lcmed = get_rounded_size_po2(needs_backwards, lcm_val);
+ lcm_out = lcm_val;
          needs_backwards_lcmed_out = needs_backwards_lcmed;
          return true;
       }
       //Check if it's multiple of alignment
       else if((backwards_multiple & (Alignment - 1u)) == 0){
- lcm = backwards_multiple;
- current_forward = ipcdetail::get_truncated_size(received_size, backwards_multiple);
- //No need to round needs_backwards because backwards_multiple == lcm
+ lcm_val = backwards_multiple;
+ current_forward = get_truncated_size(received_size, backwards_multiple);
+ //No need to round needs_backwards because backwards_multiple == lcm_val
          needs_backwards_lcmed = needs_backwards = size_to_achieve - current_forward;
          BOOST_ASSERT((needs_backwards_lcmed & (Alignment - 1u)) == 0);
- lcm_out = lcm;
+ lcm_out = lcm_val;
          needs_backwards_lcmed_out = needs_backwards_lcmed;
          return true;
       }
       //Check if it's multiple of the half of the alignmment
       else if((backwards_multiple & ((Alignment/2u) - 1u)) == 0){
- lcm = backwards_multiple*2u;
- current_forward = ipcdetail::get_truncated_size(received_size, backwards_multiple);
+ lcm_val = backwards_multiple*2u;
+ current_forward = get_truncated_size(received_size, backwards_multiple);
          needs_backwards_lcmed = needs_backwards = size_to_achieve - current_forward;
          if(0 != (needs_backwards_lcmed & (Alignment-1)))
          //while(0 != (needs_backwards_lcmed & (Alignment-1)))
             needs_backwards_lcmed += backwards_multiple;
- BOOST_ASSERT((needs_backwards_lcmed % lcm) == 0);
- lcm_out = lcm;
+ BOOST_ASSERT((needs_backwards_lcmed % lcm_val) == 0);
+ lcm_out = lcm_val;
          needs_backwards_lcmed_out = needs_backwards_lcmed;
          return true;
       }
- //Check if it's multiple of the half of the alignmment
+ //Check if it's multiple of the quarter of the alignmment
       else if((backwards_multiple & ((Alignment/4u) - 1u)) == 0){
          size_type remainder;
- lcm = backwards_multiple*4u;
- current_forward = ipcdetail::get_truncated_size(received_size, backwards_multiple);
+ lcm_val = backwards_multiple*4u;
+ current_forward = get_truncated_size(received_size, backwards_multiple);
          needs_backwards_lcmed = needs_backwards = size_to_achieve - current_forward;
          //while(0 != (needs_backwards_lcmed & (Alignment-1)))
             //needs_backwards_lcmed += backwards_multiple;
@@ -167,22 +167,22 @@
                needs_backwards_lcmed += (4-remainder)*backwards_multiple;
             }
          }
- BOOST_ASSERT((needs_backwards_lcmed % lcm) == 0);
- lcm_out = lcm;
+ BOOST_ASSERT((needs_backwards_lcmed % lcm_val) == 0);
+ lcm_out = lcm_val;
          needs_backwards_lcmed_out = needs_backwards_lcmed;
          return true;
       }
       else{
- lcm = ipcdetail::lcm(max, min);
+ lcm_val = lcm(max, min);
       }
       //If we want to use minbytes data to get a buffer between maxbytes
       //and minbytes if maxbytes can't be achieved, calculate the
       //biggest of all possibilities
- current_forward = ipcdetail::get_truncated_size(received_size, backwards_multiple);
+ current_forward = get_truncated_size(received_size, backwards_multiple);
       needs_backwards = size_to_achieve - current_forward;
       BOOST_ASSERT((needs_backwards % backwards_multiple) == 0);
- needs_backwards_lcmed = ipcdetail::get_rounded_size(needs_backwards, lcm);
- lcm_out = lcm;
+ needs_backwards_lcmed = get_rounded_size(needs_backwards, lcm_val);
+ lcm_out = lcm_val;
       needs_backwards_lcmed_out = needs_backwards_lcmed;
       return true;
    }
@@ -530,15 +530,15 @@
       }
       
       if(low_idx != n_elements){
- priv_deallocate_many(memory_algo, boost::interprocess::move(chain));
+ priv_deallocate_many(memory_algo, boost::move(chain));
       }
- return boost::interprocess::move(chain);
+ return boost::move(chain);
    }
 
    static void priv_deallocate_many(MemoryAlgorithm *memory_algo, multiallocation_chain chain)
    {
       while(!chain.empty()){
- void *addr = ipcdetail::get_pointer(chain.front());
+ void *addr = to_raw_pointer(chain.front());
          chain.pop_front();
          memory_algo->priv_deallocate(addr);
       }

Modified: branches/release/boost/interprocess/mem_algo/detail/multi_simple_seq_fit.hpp
==============================================================================
--- branches/release/boost/interprocess/mem_algo/detail/multi_simple_seq_fit.hpp (original)
+++ branches/release/boost/interprocess/mem_algo/detail/multi_simple_seq_fit.hpp 2011-12-26 12:21:36 EST (Mon, 26 Dec 2011)
@@ -1,6 +1,6 @@
 //////////////////////////////////////////////////////////////////////////////
 //
-// (C) Copyright Ion Gaztanaga 2005-2009. Distributed under the Boost
+// (C) Copyright Ion Gaztanaga 2005-2011. 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)
 //

Modified: branches/release/boost/interprocess/mem_algo/detail/multi_simple_seq_fit_impl.hpp
==============================================================================
--- branches/release/boost/interprocess/mem_algo/detail/multi_simple_seq_fit_impl.hpp (original)
+++ branches/release/boost/interprocess/mem_algo/detail/multi_simple_seq_fit_impl.hpp 2011-12-26 12:21:36 EST (Mon, 26 Dec 2011)
@@ -1,6 +1,6 @@
 //////////////////////////////////////////////////////////////////////////////
 //
-// (C) Copyright Ion Gaztanaga 2005-2009. Distributed under the Boost
+// (C) Copyright Ion Gaztanaga 2005-2011. 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)
 //
@@ -31,6 +31,7 @@
 #include <boost/type_traits/type_with_alignment.hpp>
 #include <boost/interprocess/detail/min_max.hpp>
 #include <boost/interprocess/sync/scoped_lock.hpp>
+#include <boost/intrusive/pointer_traits.hpp>
 #include <algorithm>
 #include <utility>
 #include <cstring>
@@ -68,7 +69,7 @@
    /*!Pointer type to be used with the rest of the Interprocess framework*/
    typedef VoidPointer void_pointer;
 
- typedef typename std::iterator_traits<char_ptr>::difference_type difference_type;
+ typedef typename boost::intrusive::pointer_traits<char_ptr>::difference_type difference_type;
    typedef typename boost::make_unsigned<difference_type>::type size_type;
 
 
@@ -222,13 +223,13 @@
    /*!Makes a new memory portion available for allocation*/
    void priv_add_segment(void *addr, size_type size);
 
- enum { Alignment = ::boost::alignment_of<boost::ipcdetail::max_align>::value };
- enum { BlockCtrlBytes = ipcdetail::ct_rounded_size<sizeof(block_ctrl), Alignment>::value };
- enum { BlockCtrlSize = BlockCtrlBytes/Alignment };
- enum { MinBlockSize = BlockCtrlSize + Alignment };
+ static const std::size_t Alignment = ::boost::alignment_of<boost::ipcdetail::max_align>::value;
+ static const std::size_t BlockCtrlBytes = ipcdetail::ct_rounded_size<sizeof(block_ctrl), Alignment>::value;
+ static const std::size_t BlockCtrlSize = BlockCtrlBytes/Alignment;
+ static const std::size_t MinBlockSize = BlockCtrlSize + Alignment;
 
    public:
- enum { PayloadPerAllocation = BlockCtrlBytes };
+ static const std::size_t PayloadPerAllocation = BlockCtrlBytes;
 };
 
 template<class MutexFamily, class VoidPointer>
@@ -319,7 +320,7 @@
    boost::interprocess::scoped_lock<interprocess_mutex> guard(m_header);
    //-----------------------
    return m_header.m_allocated == 0 &&
- ipcdetail::get_pointer(m_header.m_root.m_next->m_next) == &m_header.m_root;
+ ipcdetail::to_raw_pointer(m_header.m_root.m_next->m_next) == &m_header.m_root;
 }
 
 template<class MutexFamily, class VoidPointer>
@@ -328,7 +329,7 @@
    //-----------------------
    boost::interprocess::scoped_lock<interprocess_mutex> guard(m_header);
    //-----------------------
- block_ctrl *block = ipcdetail::get_pointer(m_header.m_root.m_next);
+ block_ctrl *block = ipcdetail::to_raw_pointer(m_header.m_root.m_next);
 
    //Iterate through all free portions
    do{
@@ -336,7 +337,7 @@
       std::memset( reinterpret_cast<char*>(block) + BlockCtrlBytes
                  , 0
                  , block->m_size*Alignment - BlockCtrlBytes);
- block = ipcdetail::get_pointer(block->m_next);
+ block = ipcdetail::to_raw_pointer(block->m_next);
    }
    while(block != &m_header.m_root);
 }
@@ -348,14 +349,14 @@
    //-----------------------
    boost::interprocess::scoped_lock<interprocess_mutex> guard(m_header);
    //-----------------------
- block_ctrl *block = ipcdetail::get_pointer(m_header.m_root.m_next);
+ block_ctrl *block = ipcdetail::to_raw_pointer(m_header.m_root.m_next);
 
    size_type free_memory = 0;
 
    //Iterate through all blocks obtaining their size
    do{
       //Free blocks's next must be always valid
- block_ctrl *next = ipcdetail::get_pointer(block->m_next);
+ block_ctrl *next = ipcdetail::to_raw_pointer(block->m_next);
       if(!next){
          return false;
       }
@@ -566,7 +567,7 @@
 
    //Get the root and the first memory block
    block_ctrl *prev = &m_header.m_root;
- block_ctrl *block = ipcdetail::get_pointer(prev->m_next);
+ block_ctrl *block = ipcdetail::to_raw_pointer(prev->m_next);
    block_ctrl *root = &m_header.m_root;
    block_ctrl *biggest_block = 0;
    block_ctrl *prev_biggest_block = 0;
@@ -595,7 +596,7 @@
          if(addr) return return_type(addr, false);
          //Bad luck, let's check next block
          prev = block;
- block = ipcdetail::get_pointer(block->m_next);
+ block = ipcdetail::to_raw_pointer(block->m_next);
       }
 
       //Bad luck finding preferred_size, now if we have any biggest_block
@@ -652,12 +653,12 @@
    //Take the address where the previous block should go
    block_ctrl *root = &m_header.m_root;
    block_ctrl *prev_2_block = root;
- block_ctrl *prev_block = ipcdetail::get_pointer(root->m_next);
+ block_ctrl *prev_block = ipcdetail::to_raw_pointer(root->m_next);
    while((reinterpret_cast<char*>(prev_block) + prev_block->m_size*Alignment)
             != (reinterpret_cast<char*>(ptr))
          && prev_block != root){
       prev_2_block = prev_block;
- prev_block = ipcdetail::get_pointer(prev_block->m_next);
+ prev_block = ipcdetail::to_raw_pointer(prev_block->m_next);
    }
 
    if(prev_block == root || !prev_block->m_next)
@@ -725,8 +726,8 @@
    
    //Find the previous free block of next_block
    block_ctrl *prev = &m_header.m_root;
- while(ipcdetail::get_pointer(prev->m_next) != next_block){
- prev = ipcdetail::get_pointer(prev->m_next);
+ while(ipcdetail::to_raw_pointer(prev->m_next) != next_block){
+ prev = ipcdetail::to_raw_pointer(prev->m_next);
    }
 
    //Now insert merged block in the free list
@@ -940,15 +941,15 @@
    //This ordering comparison must be done with original pointers
    //types since their mapping to raw pointers can be different
    //in each process
- while((ipcdetail::get_pointer(pos) != &m_header.m_root) && (block > pos)){
+ while((ipcdetail::to_raw_pointer(pos) != &m_header.m_root) && (block > pos)){
       prev = pos;
       pos = pos->m_next;
    }
 
    //Try to combine with upper block
- if ((reinterpret_cast<char*>(ipcdetail::get_pointer(block))
+ if ((reinterpret_cast<char*>(ipcdetail::to_raw_pointer(block))
             + Alignment*block->m_size) ==
- reinterpret_cast<char*>(ipcdetail::get_pointer(pos))){
+ reinterpret_cast<char*>(ipcdetail::to_raw_pointer(pos))){
 
       block->m_size += pos->m_size;
       block->m_next = pos->m_next;
@@ -958,9 +959,9 @@
    }
 
    //Try to combine with lower block
- if ((reinterpret_cast<char*>(ipcdetail::get_pointer(prev))
+ if ((reinterpret_cast<char*>(ipcdetail::to_raw_pointer(prev))
             + Alignment*prev->m_size) ==
- reinterpret_cast<char*>(ipcdetail::get_pointer(block))){
+ reinterpret_cast<char*>(ipcdetail::to_raw_pointer(block))){
       prev->m_size += block->m_size;
       prev->m_next = block->m_next;
    }

Modified: branches/release/boost/interprocess/mem_algo/detail/simple_seq_fit_impl.hpp
==============================================================================
--- branches/release/boost/interprocess/mem_algo/detail/simple_seq_fit_impl.hpp (original)
+++ branches/release/boost/interprocess/mem_algo/detail/simple_seq_fit_impl.hpp 2011-12-26 12:21:36 EST (Mon, 26 Dec 2011)
@@ -1,6 +1,6 @@
 //////////////////////////////////////////////////////////////////////////////
 //
-// (C) Copyright Ion Gaztanaga 2005-2009. Distributed under the Boost
+// (C) Copyright Ion Gaztanaga 2005-2011. 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)
 //
@@ -30,6 +30,7 @@
 #include <boost/interprocess/detail/min_max.hpp>
 #include <boost/interprocess/detail/type_traits.hpp>
 #include <boost/interprocess/sync/scoped_lock.hpp>
+#include <boost/intrusive/pointer_traits.hpp>
 #include <boost/interprocess/mem_algo/detail/mem_algo_common.hpp>
 #include <boost/type_traits/alignment_of.hpp>
 #include <boost/type_traits/type_with_alignment.hpp>
@@ -68,10 +69,10 @@
    typedef MutexFamily mutex_family;
    //!Pointer type to be used with the rest of the Interprocess framework
    typedef VoidPointer void_pointer;
- typedef boost::container::containers_detail::
+ typedef boost::container::container_detail::
       basic_multiallocation_chain<VoidPointer> multiallocation_chain;
 
- typedef typename std::iterator_traits<char_ptr>::difference_type difference_type;
+ typedef typename boost::intrusive::pointer_traits<char_ptr>::difference_type difference_type;
    typedef typename boost::make_unsigned<difference_type>::type size_type;
 
 
@@ -339,7 +340,7 @@
 
    m_header.m_root.m_next = reinterpret_cast<block_ctrl*>
       ((reinterpret_cast<char*>(this) + block1_off));
- algo_impl_t::assert_alignment(ipcdetail::get_pointer(m_header.m_root.m_next));
+ algo_impl_t::assert_alignment(ipcdetail::to_raw_pointer(m_header.m_root.m_next));
    m_header.m_root.m_next->m_size = (size - block1_off)/Alignment;
    m_header.m_root.m_next->m_next = &m_header.m_root;
 }
@@ -384,7 +385,7 @@
    //Get the root and the first memory block
    block_ctrl *prev = &m_header.m_root;
    block_ctrl *last = &m_header.m_root;
- block_ctrl *block = ipcdetail::get_pointer(last->m_next);
+ block_ctrl *block = ipcdetail::to_raw_pointer(last->m_next);
    block_ctrl *root = &m_header.m_root;
 
    //No free block?
@@ -394,7 +395,7 @@
    while(block != root){
       prev = last;
       last = block;
- block = ipcdetail::get_pointer(block->m_next);
+ block = ipcdetail::to_raw_pointer(block->m_next);
    }
 
    char *last_free_end_address = reinterpret_cast<char*>(last) + last->m_size*Alignment;
@@ -412,7 +413,7 @@
       unique_block = priv_allocate(boost::interprocess::allocate_new, 0, 0, ignore).first;
       if(!unique_block)
          return;
- last = ipcdetail::get_pointer(m_header.m_root.m_next);
+ last = ipcdetail::to_raw_pointer(m_header.m_root.m_next);
       BOOST_ASSERT(last_free_end_address == (reinterpret_cast<char*>(last) + last->m_size*Alignment));
    }
    size_type last_units = last->m_size;
@@ -506,7 +507,7 @@
    boost::interprocess::scoped_lock<interprocess_mutex> guard(m_header);
    //-----------------------
    return m_header.m_allocated == 0 &&
- ipcdetail::get_pointer(m_header.m_root.m_next->m_next) == &m_header.m_root;
+ ipcdetail::to_raw_pointer(m_header.m_root.m_next->m_next) == &m_header.m_root;
 }
 
 template<class MutexFamily, class VoidPointer>
@@ -515,7 +516,7 @@
    //-----------------------
    boost::interprocess::scoped_lock<interprocess_mutex> guard(m_header);
    //-----------------------
- block_ctrl *block = ipcdetail::get_pointer(m_header.m_root.m_next);
+ block_ctrl *block = ipcdetail::to_raw_pointer(m_header.m_root.m_next);
 
    //Iterate through all free portions
    do{
@@ -523,7 +524,7 @@
       std::memset( priv_get_user_buffer(block)
                  , 0
              , block->get_user_bytes());
- block = ipcdetail::get_pointer(block->m_next);
+ block = ipcdetail::to_raw_pointer(block->m_next);
    }
    while(block != &m_header.m_root);
 }
@@ -535,7 +536,7 @@
    //-----------------------
    boost::interprocess::scoped_lock<interprocess_mutex> guard(m_header);
    //-----------------------
- block_ctrl *block = ipcdetail::get_pointer(m_header.m_root.m_next);
+ block_ctrl *block = ipcdetail::to_raw_pointer(m_header.m_root.m_next);
 
    size_type free_memory = 0;
 
@@ -545,7 +546,7 @@
       if(!algo_impl_t::check_alignment(block))
          return false;
       //Free blocks's next must be always valid
- block_ctrl *next = ipcdetail::get_pointer(block->m_next);
+ block_ctrl *next = ipcdetail::to_raw_pointer(block->m_next);
       if(!next){
          return false;
       }
@@ -786,7 +787,7 @@
 
    //Get the root and the first memory block
    block_ctrl *prev = &m_header.m_root;
- block_ctrl *block = ipcdetail::get_pointer(prev->m_next);
+ block_ctrl *block = ipcdetail::to_raw_pointer(prev->m_next);
    block_ctrl *root = &m_header.m_root;
    block_ctrl *biggest_block = 0;
    block_ctrl *prev_biggest_block = 0;
@@ -821,7 +822,7 @@
          }
          //Bad luck, let's check next block
          prev = block;
- block = ipcdetail::get_pointer(block->m_next);
+ block = ipcdetail::to_raw_pointer(block->m_next);
       }
 
       //Bad luck finding preferred_size, now if we have any biggest_block
@@ -892,13 +893,13 @@
    //Take the address where the previous block should go
    block_ctrl *root = &m_header.m_root;
    block_ctrl *prev_2_block = root;
- block_ctrl *prev_block = ipcdetail::get_pointer(root->m_next);
+ block_ctrl *prev_block = ipcdetail::to_raw_pointer(root->m_next);
 
    while((reinterpret_cast<char*>(prev_block) + prev_block->m_size*Alignment)
             != reinterpret_cast<char*>(ptr)
          && prev_block != root){
       prev_2_block = prev_block;
- prev_block = ipcdetail::get_pointer(prev_block->m_next);
+ prev_block = ipcdetail::to_raw_pointer(prev_block->m_next);
    }
 
    if(prev_block == root || !prev_block->m_next)
@@ -968,8 +969,8 @@
    
    //Find the previous free block of next_block
    block_ctrl *prev = &m_header.m_root;
- while(ipcdetail::get_pointer(prev->m_next) != next_block){
- prev = ipcdetail::get_pointer(prev->m_next);
+ while(ipcdetail::to_raw_pointer(prev->m_next) != next_block){
+ prev = ipcdetail::to_raw_pointer(prev->m_next);
    }
 
    //Now insert merged block in the free list
@@ -1056,7 +1057,7 @@
    //Pointer next always points to the first
    //(lower address) block
    block_ctrl * prev = &m_header.m_root;
- block_ctrl * pos = ipcdetail::get_pointer(m_header.m_root.m_next);
+ block_ctrl * pos = ipcdetail::to_raw_pointer(m_header.m_root.m_next);
    block_ctrl * block = reinterpret_cast<block_ctrl*>(priv_get_block(addr));
 
    //All used blocks' next is marked with 0 so check it
@@ -1075,16 +1076,16 @@
    //This ordering comparison must be done with original pointers
    //types since their mapping to raw pointers can be different
    //in each process
- while((ipcdetail::get_pointer(pos) != &m_header.m_root) && (block > pos)){
+ while((ipcdetail::to_raw_pointer(pos) != &m_header.m_root) && (block > pos)){
       prev = pos;
- pos = ipcdetail::get_pointer(pos->m_next);
+ pos = ipcdetail::to_raw_pointer(pos->m_next);
    }
 
    //Try to combine with upper block
- char *block_char_ptr = reinterpret_cast<char*>(ipcdetail::get_pointer(block));
+ char *block_char_ptr = reinterpret_cast<char*>(ipcdetail::to_raw_pointer(block));
 
    if ((block_char_ptr + Alignment*block->m_size) ==
- reinterpret_cast<char*>(ipcdetail::get_pointer(pos))){
+ reinterpret_cast<char*>(ipcdetail::to_raw_pointer(pos))){
       block->m_size += pos->m_size;
       block->m_next = pos->m_next;
    }
@@ -1093,7 +1094,7 @@
    }
 
    //Try to combine with lower block
- if ((reinterpret_cast<char*>(ipcdetail::get_pointer(prev))
+ if ((reinterpret_cast<char*>(ipcdetail::to_raw_pointer(prev))
             + Alignment*prev->m_size) ==
         block_char_ptr){
 

Modified: branches/release/boost/interprocess/mem_algo/rbtree_best_fit.hpp
==============================================================================
--- branches/release/boost/interprocess/mem_algo/rbtree_best_fit.hpp (original)
+++ branches/release/boost/interprocess/mem_algo/rbtree_best_fit.hpp 2011-12-26 12:21:36 EST (Mon, 26 Dec 2011)
@@ -1,6 +1,6 @@
 //////////////////////////////////////////////////////////////////////////////
 //
-// (C) Copyright Ion Gaztanaga 2005-2009. Distributed under the Boost
+// (C) Copyright Ion Gaztanaga 2005-2011. 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,7 +25,6 @@
 #include <boost/interprocess/containers/allocation_type.hpp>
 #include <boost/container/detail/multiallocation_chain.hpp>
 #include <boost/interprocess/offset_ptr.hpp>
-#include <boost/interprocess/sync/interprocess_mutex.hpp>
 #include <boost/interprocess/exceptions.hpp>
 #include <boost/interprocess/detail/utilities.hpp>
 #include <boost/interprocess/detail/min_max.hpp>
@@ -33,6 +32,7 @@
 #include <boost/interprocess/detail/type_traits.hpp>
 #include <boost/interprocess/sync/scoped_lock.hpp>
 #include <boost/type_traits/type_with_alignment.hpp>
+#include <boost/intrusive/pointer_traits.hpp>
 #include <boost/assert.hpp>
 #include <boost/static_assert.hpp>
 #include <boost/type_traits.hpp>
@@ -81,14 +81,14 @@
    /// @endcond
 
    public:
- //!Shared interprocess_mutex family used for the rest of the Interprocess framework
+ //!Shared mutex family used for the rest of the Interprocess framework
    typedef MutexFamily mutex_family;
    //!Pointer type to be used with the rest of the Interprocess framework
    typedef VoidPointer void_pointer;
- typedef boost::container::containers_detail::
+ typedef boost::container::container_detail::
       basic_multiallocation_chain<VoidPointer> multiallocation_chain;
 
- typedef typename std::iterator_traits<char_ptr>::difference_type difference_type;
+ typedef typename boost::intrusive::pointer_traits<char_ptr>::difference_type difference_type;
    typedef typename boost::make_unsigned<difference_type>::type size_type;
 
    /// @cond
@@ -132,16 +132,16 @@
       { return block.m_size < size; }
    };
 
- //!Shared interprocess_mutex to protect memory allocate/deallocate
- typedef typename MutexFamily::mutex_type interprocess_mutex;
+ //!Shared mutex to protect memory allocate/deallocate
+ typedef typename MutexFamily::mutex_type mutex_type;
    typedef typename bi::make_multiset
       <block_ctrl, bi::base_hook<TreeHook> >::type Imultiset;
 
    typedef typename Imultiset::iterator imultiset_iterator;
 
    //!This struct includes needed data and derives from
- //!interprocess_mutex to allow EBO when using null interprocess_mutex
- struct header_t : public interprocess_mutex
+ //!mutex_type to allow EBO when using null mutex_type
+ struct header_t : public mutex_type
    {
       Imultiset m_imultiset;
 
@@ -185,7 +185,7 @@
    {
 
       //-----------------------
- boost::interprocess::scoped_lock<interprocess_mutex> guard(m_header);
+ boost::interprocess::scoped_lock<mutex_type> guard(m_header);
       //-----------------------
       return algo_impl_t::allocate_many(this, elem_bytes, num_elements);
    }
@@ -195,7 +195,7 @@
    {
 
       //-----------------------
- boost::interprocess::scoped_lock<interprocess_mutex> guard(m_header);
+ boost::interprocess::scoped_lock<mutex_type> guard(m_header);
       //-----------------------
       return algo_impl_t::allocate_many(this, elem_sizes, n_elements, sizeof_element);
    }
@@ -620,7 +620,7 @@
     all_memory_deallocated()
 {
    //-----------------------
- boost::interprocess::scoped_lock<interprocess_mutex> guard(m_header);
+ boost::interprocess::scoped_lock<mutex_type> guard(m_header);
    //-----------------------
    size_type block1_off =
       priv_first_block_offset_from_this(this, m_header.m_extra_hdr_bytes);
@@ -637,7 +637,7 @@
     check_sanity()
 {
    //-----------------------
- boost::interprocess::scoped_lock<interprocess_mutex> guard(m_header);
+ boost::interprocess::scoped_lock<mutex_type> guard(m_header);
    //-----------------------
    imultiset_iterator ib(m_header.m_imultiset.begin()), ie(m_header.m_imultiset.end());
 
@@ -671,7 +671,7 @@
    allocate(size_type nbytes)
 {
    //-----------------------
- boost::interprocess::scoped_lock<interprocess_mutex> guard(m_header);
+ boost::interprocess::scoped_lock<mutex_type> guard(m_header);
    //-----------------------
    size_type ignore;
    void * ret = priv_allocate(boost::interprocess::allocate_new, nbytes, nbytes, ignore).first;
@@ -683,7 +683,7 @@
    allocate_aligned(size_type nbytes, size_type alignment)
 {
    //-----------------------
- boost::interprocess::scoped_lock<interprocess_mutex> guard(m_header);
+ boost::interprocess::scoped_lock<mutex_type> guard(m_header);
    //-----------------------
    return algo_impl_t::allocate_aligned(this, nbytes, alignment);
 }
@@ -738,7 +738,7 @@
    size_type r_size;
    {
       //-----------------------
- boost::interprocess::scoped_lock<interprocess_mutex> guard(m_header);
+ boost::interprocess::scoped_lock<mutex_type> guard(m_header);
       //-----------------------
       ret = priv_allocate(command, l_size, p_size, r_size, reuse_ptr, sizeof_object);
    }
@@ -761,7 +761,7 @@
 inline void rbtree_best_fit<MutexFamily, VoidPointer, MemAlignment>::zero_free_memory()
 {
    //-----------------------
- boost::interprocess::scoped_lock<interprocess_mutex> guard(m_header);
+ boost::interprocess::scoped_lock<mutex_type> guard(m_header);
    //-----------------------
    imultiset_iterator ib(m_header.m_imultiset.begin()), ie(m_header.m_imultiset.end());
 
@@ -930,9 +930,9 @@
    deallocate_many(typename rbtree_best_fit<MutexFamily, VoidPointer, MemAlignment>::multiallocation_chain chain)
 {
    //-----------------------
- boost::interprocess::scoped_lock<interprocess_mutex> guard(m_header);
+ boost::interprocess::scoped_lock<mutex_type> guard(m_header);
    //-----------------------
- algo_impl_t::deallocate_many(this, boost::interprocess::move(chain));
+ algo_impl_t::deallocate_many(this, boost::move(chain));
 }
 
 template<class MutexFamily, class VoidPointer, std::size_t MemAlignment>
@@ -979,13 +979,13 @@
 
       if(it != m_header.m_imultiset.end()){
          return return_type(this->priv_check_and_allocate
- (preferred_units, ipcdetail::get_pointer(&*it), received_size), false);
+ (preferred_units, ipcdetail::to_raw_pointer(&*it), received_size), false);
       }
 
       if(it != m_header.m_imultiset.begin()&&
               (--it)->m_size >= limit_units){
          return return_type(this->priv_check_and_allocate
- (it->m_size, ipcdetail::get_pointer(&*it), received_size), false);
+ (it->m_size, ipcdetail::to_raw_pointer(&*it), received_size), false);
       }
    }
 
@@ -1330,7 +1330,7 @@
 {
    if(!addr) return;
    //-----------------------
- boost::interprocess::scoped_lock<interprocess_mutex> guard(m_header);
+ boost::interprocess::scoped_lock<mutex_type> guard(m_header);
    //-----------------------
    return this->priv_deallocate(addr);
 }

Modified: branches/release/boost/interprocess/mem_algo/simple_seq_fit.hpp
==============================================================================
--- branches/release/boost/interprocess/mem_algo/simple_seq_fit.hpp (original)
+++ branches/release/boost/interprocess/mem_algo/simple_seq_fit.hpp 2011-12-26 12:21:36 EST (Mon, 26 Dec 2011)
@@ -1,6 +1,6 @@
 //////////////////////////////////////////////////////////////////////////////
 //
-// (C) Copyright Ion Gaztanaga 2005-2009. Distributed under the Boost
+// (C) Copyright Ion Gaztanaga 2005-2011. 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)
 //

Modified: branches/release/boost/interprocess/offset_ptr.hpp
==============================================================================
--- branches/release/boost/interprocess/offset_ptr.hpp (original)
+++ branches/release/boost/interprocess/offset_ptr.hpp 2011-12-26 12:21:36 EST (Mon, 26 Dec 2011)
@@ -1,6 +1,6 @@
 //////////////////////////////////////////////////////////////////////////////
 //
-// (C) Copyright Ion Gaztanaga 2005-2009. Distributed under the Boost
+// (C) Copyright Ion Gaztanaga 2005-2011. 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)
 //
@@ -8,8 +8,8 @@
 //
 //////////////////////////////////////////////////////////////////////////////
 
-#ifndef BOOST_OFFSET_PTR_HPP
-#define BOOST_OFFSET_PTR_HPP
+#ifndef BOOST_INTERPROCESS_OFFSET_PTR_HPP
+#define BOOST_INTERPROCESS_OFFSET_PTR_HPP
 
 #if (defined _MSC_VER) && (_MSC_VER >= 1200)
 # pragma once
@@ -22,8 +22,6 @@
 #include <boost/interprocess/detail/utilities.hpp>
 #include <boost/interprocess/detail/cast_tags.hpp>
 #include <boost/interprocess/detail/mpl.hpp>
-#include <boost/pointer_cast.hpp>
-#include <boost/pointer_to_other.hpp>
 #include <boost/assert.hpp>
 #include <ostream>
 #include <istream>
@@ -57,73 +55,19 @@
 {
    /// @cond
    typedef offset_ptr<PointedType, DifferenceType, OffsetType, OffsetAlignment> self_t;
-
    void unspecified_bool_type_func() const {}
    typedef void (self_t::*unspecified_bool_type)() const;
-
- //Note: using the address of a local variable to point to another address
- //is not standard conforming and this can be optimized-away by the compiler.
- //Non-inlining is a method to remain illegal and correct
- #if defined(_MSC_VER) && (_MSC_VER >= 1400)
- __declspec(noinline) //this workaround is needed for msvc-8.0 and msvc-9.0
- #elif defined (__GNUC__)//this workaround is needed for GCC
- __attribute__((noinline))
- #endif
- void set_offset(const PointedType *ptr)
- {
- #if defined (__GNUC__)
- //asm(""); //Prevents the function to be optimized-away (provokes an special "side-effect")
- #endif
- //offset == 1 && ptr != 0 is not legal for this pointer
- if(!ptr){
- internal.m_offset = 1;
- }
- else{
- internal.m_offset = (OffsetType)((const char*)ptr - (const char*)(this));
- BOOST_ASSERT(internal.m_offset != 1);
- }
- }
-
- #if defined(_MSC_VER) && (_MSC_VER >= 1400)
- __declspec(noinline)
- #elif defined (__GNUC__)
- __attribute__((noinline))
- #endif
- PointedType * get_pointer() const
- {
- #if defined (__GNUC__)
- //asm(""); //Prevents the function to be optimized-away (provokes an special "side-effect")
- #endif
- return static_cast<PointedType *>(
- static_cast<void*>(
- (internal.m_offset == 1) ?
- 0 :
- (const_cast<char*>(reinterpret_cast<const char*>(this)) + internal.m_offset)
- )
- );
- }
-
- void inc_offset(DifferenceType bytes)
- { internal.m_offset += bytes; }
-
- void dec_offset(DifferenceType bytes)
- { internal.m_offset -= bytes; }
-
- union internal_type{
- OffsetType m_offset; //Distance between this object and pointed address
- typename ::boost::aligned_storage
- < sizeof(OffsetType)
- , (OffsetAlignment == offset_type_alignment) ?
- ::boost::alignment_of<OffsetType>::value : OffsetAlignment
- >::type alignment_helper;
- } internal;
    /// @endcond
 
    public:
+ typedef PointedType element_type;
    typedef PointedType * pointer;
    typedef typename ipcdetail::
       add_reference<PointedType>::type reference;
- typedef PointedType value_type;
+ typedef typename ipcdetail::
+ remove_volatile<typename ipcdetail::
+ remove_const<PointedType>::type
+ >::type value_type;
    typedef DifferenceType difference_type;
    typedef std::random_access_iterator_tag iterator_category;
    typedef OffsetType offset_type;
@@ -137,8 +81,9 @@
    //!Constructor from other pointer.
    //!Never throws.
    template <class T>
- offset_ptr(T *ptr)
- { pointer p (ptr); (void)p; this->set_offset(p); }
+ offset_ptr( T *ptr
+ , typename ipcdetail::enable_if< ipcdetail::is_convertible<T*, PointedType*> >::type * = 0)
+ { this->set_offset(static_cast<PointedType*>(ptr)); }
 
    //!Constructor from other offset_ptr
    //!Never throws.
@@ -148,8 +93,9 @@
    //!Constructor from other offset_ptr. If pointers of pointee types are
    //!convertible, offset_ptrs will be convertibles. Never throws.
    template<class T2, class P2, class O2, std::size_t A2>
- offset_ptr(const offset_ptr<T2, P2, O2, A2> &ptr)
- { pointer p(ptr.get()); (void)p; this->set_offset(p); }
+ offset_ptr( const offset_ptr<T2, P2, O2, A2> &ptr
+ , typename ipcdetail::enable_if< ipcdetail::is_convertible<T2*, PointedType*> >::type * = 0)
+ { this->set_offset(static_cast<PointedType*>(ptr.get())); }
 
    //!Emulates static_cast operator.
    //!Never throws.
@@ -178,7 +124,7 @@
    //!Obtains raw pointer from offset.
    //!Never throws.
    pointer get()const
- { return this->get_pointer(); }
+ { return this->to_raw_pointer(); }
 
    offset_type get_offset() const
    { return internal.m_offset; }
@@ -216,25 +162,13 @@
    //!Assignment from related offset_ptr. If pointers of pointee types
    //! are assignable, offset_ptrs will be assignable. Never throws.
    template<class T2, class P2, class O2, std::size_t A2>
- offset_ptr& operator= (const offset_ptr<T2, P2, O2, A2> & pt)
- { pointer p(pt.get()); this->set_offset(p); return *this; }
+ typename ipcdetail::enable_if<ipcdetail::is_convertible<T2*, PointedType*>, offset_ptr&>::type
+ operator= (const offset_ptr<T2, P2, O2, A2> & ptr)
+ { this->set_offset(static_cast<PointedType*>(ptr.get())); return *this; }
  
- //!offset_ptr + difference_type.
- //!Never throws.
- template<class T>
- offset_ptr operator+ (T offset) const
- { return offset_ptr(this->get()+offset); }
-
- //!offset_ptr - difference_type.
- //!Never throws.
- template<class T>
- offset_ptr operator- (T offset) const
- { return offset_ptr(this->get()-offset); }
-
    //!offset_ptr += difference_type.
    //!Never throws.
- template<class T>
- offset_ptr &operator+= (T offset)
+ offset_ptr &operator+= (difference_type offset)
    { this->inc_offset(offset * sizeof (PointedType)); return *this; }
 
    //!offset_ptr -= difference_type.
@@ -272,57 +206,168 @@
    //!Never throws
    bool operator! () const
    { return this->get() == 0; }
-/*
- friend void swap (offset_ptr &pt, offset_ptr &pt2)
- {
- value_type *ptr = pt.get();
- pt = pt2;
- pt2 = ptr;
+
+ //!Compatibility with pointer_traits
+ //!
+ template <class U>
+ struct rebind
+ { typedef offset_ptr<U, DifferenceType, OffsetType, OffsetAlignment> other; };
+
+ //!Compatibility with pointer_traits
+ //!
+ static offset_ptr pointer_to(reference r)
+ { return offset_ptr(&r); }
+
+ //!difference_type + offset_ptr
+ //!operation
+ friend offset_ptr operator+(difference_type diff, const offset_ptr& right)
+ { offset_ptr tmp(right); tmp += diff; return tmp; }
+
+ //!offset_ptr + difference_type
+ //!operation
+ friend offset_ptr operator+(const offset_ptr& left, difference_type diff)
+ { offset_ptr tmp(left); tmp += diff; return tmp; }
+
+ //!offset_ptr - diff
+ //!operation
+ friend offset_ptr operator-(const offset_ptr &left, difference_type diff)
+ { offset_ptr tmp(left); tmp -= diff; return tmp; }
+
+ //!offset_ptr - diff
+ //!operation
+ friend offset_ptr operator-(difference_type diff, const offset_ptr &right)
+ { offset_ptr tmp(right); tmp -= diff; return tmp; }
+
+ //!offset_ptr - offset_ptr
+ //!operation
+ friend difference_type operator-(const offset_ptr &pt, const offset_ptr &pt2)
+ { return difference_type(pt.get()- pt2.get()); }
+
+ //Comparison
+ friend bool operator== (const offset_ptr &pt1, const offset_ptr &pt2)
+ { return pt1.get() == pt2.get(); }
+
+ friend bool operator!= (const offset_ptr &pt1, const offset_ptr &pt2)
+ { return pt1.get() != pt2.get(); }
+
+ friend bool operator<(const offset_ptr &pt1, const offset_ptr &pt2)
+ { return pt1.get() < pt2.get(); }
+
+ friend bool operator<=(const offset_ptr &pt1, const offset_ptr &pt2)
+ { return pt1.get() <= pt2.get(); }
+
+ friend bool operator>(const offset_ptr &pt1, const offset_ptr &pt2)
+ { return pt1.get() > pt2.get(); }
+
+ friend bool operator>=(const offset_ptr &pt1, const offset_ptr &pt2)
+ { return pt1.get() >= pt2.get(); }
+
+ //Comparison to raw ptr to support literal 0
+ friend bool operator== (pointer pt1, const offset_ptr &pt2)
+ { return pt1 == pt2.get(); }
+
+ friend bool operator!= (pointer pt1, const offset_ptr &pt2)
+ { return pt1 != pt2.get(); }
+
+ friend bool operator<(pointer pt1, const offset_ptr &pt2)
+ { return pt1 < pt2.get(); }
+
+ friend bool operator<=(pointer pt1, const offset_ptr &pt2)
+ { return pt1 <= pt2.get(); }
+
+ friend bool operator>(pointer pt1, const offset_ptr &pt2)
+ { return pt1 > pt2.get(); }
+
+ friend bool operator>=(pointer pt1, const offset_ptr &pt2)
+ { return pt1 >= pt2.get(); }
+
+ //Comparison
+ friend bool operator== (const offset_ptr &pt1, pointer pt2)
+ { return pt1.get() == pt2; }
+
+ friend bool operator!= (const offset_ptr &pt1, pointer pt2)
+ { return pt1.get() != pt2; }
+
+ friend bool operator<(const offset_ptr &pt1, pointer pt2)
+ { return pt1.get() < pt2; }
+
+ friend bool operator<=(const offset_ptr &pt1, pointer pt2)
+ { return pt1.get() <= pt2; }
+
+ friend bool operator>(const offset_ptr &pt1, pointer pt2)
+ { return pt1.get() > pt2; }
+
+ friend bool operator>=(const offset_ptr &pt1, pointer pt2)
+ { return pt1.get() >= pt2; }
+
+ friend void swap(offset_ptr &left, offset_ptr &right)
+ {
+ pointer ptr = right.get();
+ right = left;
+ left = ptr;
    }
-*/
-};
 
-//!offset_ptr<T1, P1, O1, A1> == offset_ptr<T2, P2, O2, A2>.
-//!Never throws.
-template<class T1, class P1, class O1, std::size_t A1, class T2, class P2, class O2, std::size_t A2>
-inline bool operator== (const offset_ptr<T1, P1, O1, A1> &pt1,
- const offset_ptr<T2, P2, O2, A2> &pt2)
-{ return pt1.get() == pt2.get(); }
+ private:
+ /// @cond
 
-//!offset_ptr<T1, P1, O1, A1> != offset_ptr<T2, P2, O2, A2>.
-//!Never throws.
-template<class T1, class P1, class O1, std::size_t A1, class T2, class P2, class O2, std::size_t A2>
-inline bool operator!= (const offset_ptr<T1, P1, O1, A1> &pt1,
- const offset_ptr<T2, P2, O2, A2> &pt2)
-{ return pt1.get() != pt2.get(); }
+ //Note: using the address of a local variable to point to another address
+ //is not standard conforming and this can be optimized-away by the compiler.
+ //Non-inlining is a method to remain illegal and correct
+ #if defined(_MSC_VER)
+ __declspec(noinline) //this workaround is needed for MSVC compilers
+ #elif defined (__GNUC__)//this workaround is needed for GCC
+ __attribute__((noinline))
+ #endif
+ void set_offset(const PointedType *ptr)
+ {
+ #if defined (__GNUC__)
+ //asm(""); //Prevents the function to be optimized-away (provokes an special "side-effect")
+ #endif
+ //offset == 1 && ptr != 0 is not legal for this pointer
+ if(!ptr){
+ internal.m_offset = 1;
+ }
+ else{
+ internal.m_offset = (OffsetType)((const char*)ptr - (const char*)(this));
+ BOOST_ASSERT(internal.m_offset != 1);
+ }
+ }
 
-//!offset_ptr<T1, P1, O1, A1> < offset_ptr<T2, P2, O2, A2>.
-//!Never throws.
-template<class T1, class P1, class O1, std::size_t A1, class T2, class P2, class O2, std::size_t A2>
-inline bool operator< (const offset_ptr<T1, P1, O1, A1> &pt1,
- const offset_ptr<T2, P2, O2, A2> &pt2)
-{ return pt1.get() < pt2.get(); }
+ #if defined(_MSC_VER) && (_MSC_VER >= 1400)
+ __declspec(noinline)
+ #elif defined (__GNUC__)
+ __attribute__((noinline))
+ #endif
+ PointedType * to_raw_pointer() const
+ {
+ #if defined (__GNUC__)
+ //asm(""); //Prevents the function to be optimized-away (provokes an special "side-effect")
+ #endif
+ return static_cast<PointedType *>(
+ static_cast<void*>(
+ (internal.m_offset == 1) ?
+ 0 :
+ (const_cast<char*>(reinterpret_cast<const char*>(this)) + internal.m_offset)
+ )
+ );
+ }
 
-//!offset_ptr<T1, P1, O1, A1> <= offset_ptr<T2, P2, O2, A2>.
-//!Never throws.
-template<class T1, class P1, class O1, std::size_t A1, class T2, class P2, class O2, std::size_t A2>
-inline bool operator<= (const offset_ptr<T1, P1, O1, A1> &pt1,
- const offset_ptr<T2, P2, O2, A2> &pt2)
-{ return pt1.get() <= pt2.get(); }
+ void inc_offset(DifferenceType bytes)
+ { internal.m_offset += bytes; }
 
-//!offset_ptr<T1, P1, O1, A1> > offset_ptr<T2, P2, O2, A2>.
-//!Never throws.
-template<class T1, class P1, class O1, std::size_t A1, class T2, class P2, class O2, std::size_t A2>
-inline bool operator> (const offset_ptr<T1, P1, O1, A1> &pt1,
- const offset_ptr<T2, P2, O2, A2> &pt2)
-{ return pt1.get() > pt2.get(); }
+ void dec_offset(DifferenceType bytes)
+ { internal.m_offset -= bytes; }
 
-//!offset_ptr<T1, P1, O1, A1> >= offset_ptr<T2, P2, O2, A2>.
-//!Never throws.
-template<class T1, class P1, class O1, std::size_t A1, class T2, class P2, class O2, std::size_t A2>
-inline bool operator>= (const offset_ptr<T1, P1, O1, A1> &pt1,
- const offset_ptr<T2, P2, O2, A2> &pt2)
-{ return pt1.get() >= pt2.get(); }
+ union internal_type{
+ OffsetType m_offset; //Distance between this object and pointee address
+ typename ::boost::aligned_storage
+ < sizeof(OffsetType)
+ , (OffsetAlignment == offset_type_alignment) ?
+ ::boost::alignment_of<OffsetType>::value : OffsetAlignment
+ >::type alignment_helper;
+ } internal;
+ /// @endcond
+};
 
 //!operator<<
 //!for offset ptr
@@ -338,30 +383,6 @@
    (std::basic_istream<E, T> & is, offset_ptr<W, X, Y, Z> & p)
 { return is >> p.get_offset(); }
 
-//!difference_type + offset_ptr
-//!operation
-template<class T, class P, class O, std::size_t A, class D>
-inline offset_ptr<T, P, O, A> operator+(D diff, const offset_ptr<T, P, O, A>& right)
-{ return right + diff; }
-
-//!offset_ptr - offset_ptr
-//!operation
-template<class T1, class P1, class O1, std::size_t A1, class T2, class P2, class O2, std::size_t A2>
-inline typename offset_ptr<T1, P1, O1, A1>::difference_type operator-
- (const offset_ptr<T1, P1, O1, A1> &pt, const offset_ptr<T2, P2, O2, A2> &pt2)
-{ return typename offset_ptr<T1, P1, O1, A1>::difference_type(pt.get()- pt2.get()); }
-
-//!swap specialization
-//!for offset_ptr
-template<class T, class P, class O, std::size_t A>
-inline void swap (boost::interprocess::offset_ptr<T, P, O, A> &pt,
- boost::interprocess::offset_ptr<T, P, O, A> &pt2)
-{
- typename offset_ptr<T, P, O, A>::value_type *ptr = pt.get();
- pt = pt2;
- pt2 = ptr;
-}
-
 //!Simulation of static_cast between pointers. Never throws.
 template<class T1, class P1, class O1, std::size_t A1, class T2, class P2, class O2, std::size_t A2>
 inline boost::interprocess::offset_ptr<T1, P1, O1, A1>
@@ -406,23 +427,23 @@
 template <class T, class P, class O, std::size_t A>
 struct has_trivial_constructor< boost::interprocess::offset_ptr<T, P, O, A> >
 {
- enum { value = true };
+ static const bool value = true;
 };
 
 ///has_trivial_destructor<> == true_type specialization for optimizations
 template <class T, class P, class O, std::size_t A>
 struct has_trivial_destructor< boost::interprocess::offset_ptr<T, P, O, A> >
 {
- enum { value = true };
+ static const bool value = true;
 };
 
 //#if !defined(_MSC_VER) || (_MSC_VER >= 1400)
 namespace interprocess {
 //#endif
-//!get_pointer() enables boost::mem_fn to recognize offset_ptr.
+//!to_raw_pointer() enables boost::mem_fn to recognize offset_ptr.
 //!Never throws.
 template <class T, class P, class O, std::size_t A>
-inline T * get_pointer(boost::interprocess::offset_ptr<T, P, O, A> const & p)
+inline T * to_raw_pointer(boost::interprocess::offset_ptr<T, P, O, A> const & p)
 { return p.get(); }
 //#if !defined(_MSC_VER) || (_MSC_VER >= 1400)
 } //namespace interprocess
@@ -485,6 +506,11 @@
 
 } //namespace intrusive
 
+//Predeclaration
+template<class T, class U>
+struct pointer_to_other;
+
+//Backwards compatibility with pointer_to_other
 template<class T, class T2, class T3, std::size_t A, class U>
 struct pointer_to_other< ::boost::interprocess::offset_ptr<T, T2, T3, A>, U >
 {
@@ -496,5 +522,4 @@
 
 #include <boost/interprocess/detail/config_end.hpp>
 
-#endif //#ifndef BOOST_OFFSET_PTR_HPP
-
+#endif //#ifndef BOOST_INTERPROCESS_OFFSET_PTR_HPP

Modified: branches/release/boost/interprocess/permissions.hpp
==============================================================================
--- branches/release/boost/interprocess/permissions.hpp (original)
+++ branches/release/boost/interprocess/permissions.hpp 2011-12-26 12:21:36 EST (Mon, 26 Dec 2011)
@@ -1,6 +1,6 @@
 //////////////////////////////////////////////////////////////////////////////
 //
-// (C) Copyright Ion Gaztanaga 2005-2009. Distributed under the Boost
+// (C) Copyright Ion Gaztanaga 2005-2011. 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)
 //

Modified: branches/release/boost/interprocess/segment_manager.hpp
==============================================================================
--- branches/release/boost/interprocess/segment_manager.hpp (original)
+++ branches/release/boost/interprocess/segment_manager.hpp 2011-12-26 12:21:36 EST (Mon, 26 Dec 2011)
@@ -1,6 +1,6 @@
 //////////////////////////////////////////////////////////////////////////////
 //
-// (C) Copyright Ion Gaztanaga 2005-2009. Distributed under the Boost
+// (C) Copyright Ion Gaztanaga 2005-2011. 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)
 //
@@ -32,7 +32,7 @@
 #include <boost/interprocess/exceptions.hpp>
 #include <boost/interprocess/allocators/allocator.hpp>
 #include <boost/interprocess/smart_ptr/deleter.hpp>
-#include <boost/interprocess/detail/move.hpp>
+#include <boost/move/move.hpp>
 #include <boost/interprocess/sync/scoped_lock.hpp>
 #include <cstddef> //std::size_t
 #include <string> //char_traits
@@ -129,7 +129,7 @@
    {
       multiallocation_chain mem(MemoryAlgorithm::allocate_many(elem_bytes, num_elements));
       if(mem.empty()) throw bad_alloc();
- return boost::interprocess::move(mem);
+ return boost::move(mem);
    }
 
    //!Allocates n_elements, each one of
@@ -139,7 +139,7 @@
    {
       multiallocation_chain mem(MemoryAlgorithm::allocate_many(element_lenghts, n_elements, sizeof_element));
       if(mem.empty()) throw bad_alloc();
- return boost::interprocess::move(mem);
+ return boost::move(mem);
    }
 
    //!Allocates n_elements of
@@ -158,7 +158,7 @@
    //!Deallocates elements pointed by the
    //!multiallocation iterator range.
    void deallocate_many(multiallocation_chain chain)
- { MemoryAlgorithm::deallocate_many(boost::interprocess::move(chain)); }
+ { MemoryAlgorithm::deallocate_many(boost::move(chain)); }
 
    /// @endcond
 
@@ -903,7 +903,7 @@
       if(it != index.end()){
          //Get header
          block_header_t *ctrl_data = reinterpret_cast<block_header_t*>
- (ipcdetail::get_pointer(it->second.m_ptr));
+ (ipcdetail::to_raw_pointer(it->second.m_ptr));
 
          //Sanity check
          BOOST_ASSERT((ctrl_data->m_value_bytes % table.size) == 0);
@@ -1029,7 +1029,7 @@
 
       //Get allocation parameters
       block_header_t *ctrl_data = reinterpret_cast<block_header_t*>
- (ipcdetail::get_pointer(it->second.m_ptr));
+ (ipcdetail::to_raw_pointer(it->second.m_ptr));
       char *stored_name = static_cast<char*>(static_cast<void*>(const_cast<CharT*>(it->first.name())));
       (void)stored_name;
 
@@ -1255,7 +1255,7 @@
       if(!insert_ret.second){
          if(try2find){
             block_header_t *hdr = static_cast<block_header_t*>
- (ipcdetail::get_pointer(it->second.m_ptr));
+ (ipcdetail::to_raw_pointer(it->second.m_ptr));
             return hdr->value();
          }
          return 0;
@@ -1336,7 +1336,7 @@
       if(use_lock){
          local.lock();
       }
- return scoped_lock<rmutex>(boost::interprocess::move(local));
+ return scoped_lock<rmutex>(boost::move(local));
    }
 
    //!This struct includes needed data and derives from

Modified: branches/release/boost/interprocess/shared_memory_object.hpp
==============================================================================
--- branches/release/boost/interprocess/shared_memory_object.hpp (original)
+++ branches/release/boost/interprocess/shared_memory_object.hpp 2011-12-26 12:21:36 EST (Mon, 26 Dec 2011)
@@ -1,6 +1,6 @@
 //////////////////////////////////////////////////////////////////////////////
 //
-// (C) Copyright Ion Gaztanaga 2005-2009. Distributed under the Boost
+// (C) Copyright Ion Gaztanaga 2005-2011. 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)
 //
@@ -15,7 +15,7 @@
 #include <boost/interprocess/detail/workaround.hpp>
 #include <boost/interprocess/creation_tags.hpp>
 #include <boost/interprocess/exceptions.hpp>
-#include <boost/interprocess/detail/move.hpp>
+#include <boost/move/move.hpp>
 #include <boost/interprocess/interprocess_fwd.hpp>
 #include <boost/interprocess/exceptions.hpp>
 #include <boost/interprocess/detail/os_file_functions.hpp>
@@ -88,7 +88,7 @@
    //!Does not throw
    shared_memory_object &operator=(BOOST_RV_REF(shared_memory_object) moved)
    {
- shared_memory_object tmp(boost::interprocess::move(moved));
+ shared_memory_object tmp(boost::move(moved));
       this->swap(tmp);
       return *this;
    }
@@ -251,7 +251,7 @@
 
 #if defined(__FreeBSD__)
 
-inline bool use_filesistem_based_posix()
+inline bool use_filesystem_based_posix()
 {
    int jailed = 0;
    std::size_t len = sizeof(jailed);
@@ -275,7 +275,7 @@
    #if defined(BOOST_INTERPROCESS_FILESYSTEM_BASED_POSIX_SHARED_MEMORY)
    const bool add_leading_slash = false;
    #elif defined(BOOST_INTERPROCESS_RUNTIME_FILESYSTEM_BASED_POSIX_SHARED_MEMORY)
- const bool add_leading_slash = !shared_memory_object_ipcdetail::use_filesistem_based_posix();
+ const bool add_leading_slash = !shared_memory_object_detail::use_filesystem_based_posix();
    #else
    const bool add_leading_slash = true;
    #endif
@@ -361,7 +361,7 @@
       #if defined(BOOST_INTERPROCESS_FILESYSTEM_BASED_POSIX_SHARED_MEMORY)
       const bool add_leading_slash = false;
       #elif defined(BOOST_INTERPROCESS_RUNTIME_FILESYSTEM_BASED_POSIX_SHARED_MEMORY)
- const bool add_leading_slash = !shared_memory_object_ipcdetail::use_filesistem_based_posix();
+ const bool add_leading_slash = !shared_memory_object_detail::use_filesystem_based_posix();
       #else
       const bool add_leading_slash = true;
       #endif

Modified: branches/release/boost/interprocess/smart_ptr/deleter.hpp
==============================================================================
--- branches/release/boost/interprocess/smart_ptr/deleter.hpp (original)
+++ branches/release/boost/interprocess/smart_ptr/deleter.hpp 2011-12-26 12:21:36 EST (Mon, 26 Dec 2011)
@@ -1,6 +1,6 @@
 //////////////////////////////////////////////////////////////////////////////
 //
-// (C) Copyright Ion Gaztanaga 2007-2009.
+// (C) Copyright Ion Gaztanaga 2007-2011.
 //
 // Distributed under the Boost Software License, Version 1.0.
 // (See accompanying file LICENSE_1_0.txt or copy at
@@ -51,7 +51,7 @@
    {}
 
    void operator()(const pointer &p)
- { mp_mngr->destroy_ptr(ipcdetail::get_pointer(p)); }
+ { mp_mngr->destroy_ptr(ipcdetail::to_raw_pointer(p)); }
 };
 
 } //namespace interprocess {

Modified: branches/release/boost/interprocess/smart_ptr/detail/shared_count.hpp
==============================================================================
--- branches/release/boost/interprocess/smart_ptr/detail/shared_count.hpp (original)
+++ branches/release/boost/interprocess/smart_ptr/detail/shared_count.hpp 2011-12-26 12:21:36 EST (Mon, 26 Dec 2011)
@@ -4,7 +4,7 @@
 //
 // (C) Copyright Peter Dimov and Multi Media Ltd. 2001, 2002, 2003
 // (C) Copyright Peter Dimov 2004-2005
-// (C) Copyright Ion Gaztanaga 2006-2009. Distributed under the Boost
+// (C) Copyright Ion Gaztanaga 2006-2011. 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)
 //
@@ -92,7 +92,7 @@
                         deallocator(m_pi, alloc);
             //It's more correct to use VoidAllocator::construct but
             //this needs copy constructor and we don't like it
- new(ipcdetail::get_pointer(m_pi))counted_impl(p, a, d);
+ new(ipcdetail::to_raw_pointer(m_pi))counted_impl(p, a, d);
             deallocator.release();
          }
       }
@@ -105,7 +105,7 @@
 
    ~shared_count() // nothrow
    {
- if( m_pi != 0 )
+ if(m_pi)
          m_pi->release();
    }
 
@@ -145,10 +145,10 @@
       }
    }
 
- const pointer &get_pointer() const
+ const pointer &to_raw_pointer() const
    { return m_px; }
 
- pointer &get_pointer()
+ pointer &to_raw_pointer()
    { return m_px; }
 
    shared_count & operator= (shared_count const & r) // nothrow

Modified: branches/release/boost/interprocess/smart_ptr/detail/sp_counted_base.hpp
==============================================================================
--- branches/release/boost/interprocess/smart_ptr/detail/sp_counted_base.hpp (original)
+++ branches/release/boost/interprocess/smart_ptr/detail/sp_counted_base.hpp 2011-12-26 12:21:36 EST (Mon, 26 Dec 2011)
@@ -1,6 +1,6 @@
 //////////////////////////////////////////////////////////////////////////////
 //
-// (C) Copyright Ion Gaztanaga 2007-2009.
+// (C) Copyright Ion Gaztanaga 2007-2011.
 //
 // Distributed under the Boost Software License, Version 1.0.
 // (See accompanying file LICENSE_1_0.txt or copy at

Modified: branches/release/boost/interprocess/smart_ptr/detail/sp_counted_base_atomic.hpp
==============================================================================
--- branches/release/boost/interprocess/smart_ptr/detail/sp_counted_base_atomic.hpp (original)
+++ branches/release/boost/interprocess/smart_ptr/detail/sp_counted_base_atomic.hpp 2011-12-26 12:21:36 EST (Mon, 26 Dec 2011)
@@ -9,7 +9,7 @@
 
 // Copyright (c) 2001, 2002, 2003 Peter Dimov and Multi Media Ltd.
 // Copyright 2004-2005 Peter Dimov
-// Copyright 2007-2009 Ion Gaztanaga
+// Copyright 2007-2011 Ion Gaztanaga
 //
 // Distributed under the Boost Software License, Version 1.0. (See
 // accompanying file LICENSE_1_0.txt or copy at

Modified: branches/release/boost/interprocess/smart_ptr/detail/sp_counted_impl.hpp
==============================================================================
--- branches/release/boost/interprocess/smart_ptr/detail/sp_counted_impl.hpp (original)
+++ branches/release/boost/interprocess/smart_ptr/detail/sp_counted_impl.hpp 2011-12-26 12:21:36 EST (Mon, 26 Dec 2011)
@@ -115,7 +115,7 @@
       scoped_ptr< this_type, scoped_ptr_dealloc_functor<this_allocator> >
          deleter(this_ptr, a_copy);
       typedef typename this_allocator::value_type value_type;
- ipcdetail::get_pointer(this_ptr)->~value_type();
+ ipcdetail::to_raw_pointer(this_ptr)->~value_type();
    }
 
    void release() // nothrow

Modified: branches/release/boost/interprocess/smart_ptr/enable_shared_from_this.hpp
==============================================================================
--- branches/release/boost/interprocess/smart_ptr/enable_shared_from_this.hpp (original)
+++ branches/release/boost/interprocess/smart_ptr/enable_shared_from_this.hpp 2011-12-26 12:21:36 EST (Mon, 26 Dec 2011)
@@ -53,14 +53,14 @@
    shared_ptr<T, A, D> shared_from_this()
    {
       shared_ptr<T, A, D> p(_internal_weak_this);
- BOOST_ASSERT(ipcdetail::get_pointer(p.get()) == this);
+ BOOST_ASSERT(ipcdetail::to_raw_pointer(p.get()) == this);
       return p;
    }
 
    shared_ptr<T const, A, D> shared_from_this() const
    {
       shared_ptr<T const, A, D> p(_internal_weak_this);
- BOOST_ASSERT(ipcdetail::get_pointer(p.get()) == this);
+ BOOST_ASSERT(ipcdetail::to_raw_pointer(p.get()) == this);
       return p;
    }
 

Modified: branches/release/boost/interprocess/smart_ptr/intrusive_ptr.hpp
==============================================================================
--- branches/release/boost/interprocess/smart_ptr/intrusive_ptr.hpp (original)
+++ branches/release/boost/interprocess/smart_ptr/intrusive_ptr.hpp 2011-12-26 12:21:36 EST (Mon, 26 Dec 2011)
@@ -68,35 +68,35 @@
    {}
 
    //!Constructor. Copies pointer and if "p" is not zero and
- //!"add_ref" is true calls intrusive_ptr_add_ref(get_pointer(p)).
+ //!"add_ref" is true calls intrusive_ptr_add_ref(to_raw_pointer(p)).
    //!Does not throw
    intrusive_ptr(const pointer &p, bool add_ref = true): m_ptr(p)
    {
- if(m_ptr != 0 && add_ref) intrusive_ptr_add_ref(ipcdetail::get_pointer(m_ptr));
+ if(m_ptr != 0 && add_ref) intrusive_ptr_add_ref(ipcdetail::to_raw_pointer(m_ptr));
    }
 
    //!Copy constructor. Copies the internal pointer and if "p" is not
- //!zero calls intrusive_ptr_add_ref(get_pointer(p)). Does not throw
+ //!zero calls intrusive_ptr_add_ref(to_raw_pointer(p)). Does not throw
    intrusive_ptr(intrusive_ptr const & rhs)
       : m_ptr(rhs.m_ptr)
    {
- if(m_ptr != 0) intrusive_ptr_add_ref(ipcdetail::get_pointer(m_ptr));
+ if(m_ptr != 0) intrusive_ptr_add_ref(ipcdetail::to_raw_pointer(m_ptr));
    }
 
    //!Constructor from related. Copies the internal pointer and if "p" is not
- //!zero calls intrusive_ptr_add_ref(get_pointer(p)). Does not throw
+ //!zero calls intrusive_ptr_add_ref(to_raw_pointer(p)). Does not throw
    template<class U> intrusive_ptr
       (intrusive_ptr<U, VP> const & rhs)
       : m_ptr(rhs.get())
    {
- if(m_ptr != 0) intrusive_ptr_add_ref(ipcdetail::get_pointer(m_ptr));
+ if(m_ptr != 0) intrusive_ptr_add_ref(ipcdetail::to_raw_pointer(m_ptr));
    }
 
    //!Destructor. If internal pointer is not 0, calls
- //!intrusive_ptr_release(get_pointer(m_ptr)). Does not throw
+ //!intrusive_ptr_release(to_raw_pointer(m_ptr)). Does not throw
    ~intrusive_ptr()
    {
- if(m_ptr != 0) intrusive_ptr_release(ipcdetail::get_pointer(m_ptr));
+ if(m_ptr != 0) intrusive_ptr_release(ipcdetail::to_raw_pointer(m_ptr));
    }
 
    //!Assignment operator. Equivalent to intrusive_ptr(r).swap(*this).
@@ -239,7 +239,7 @@
 //!Does not throw
 template<class T, class VP>
 inline typename boost::interprocess::intrusive_ptr<T, VP>::pointer
- get_pointer(intrusive_ptr<T, VP> p)
+ to_raw_pointer(intrusive_ptr<T, VP> p)
 { return p.get(); }
 
 /*Emulates static cast operator. Does not throw*/
@@ -281,7 +281,7 @@
 //!Returns p.get().
 //!Does not throw
 template<class T, class VP>
-inline T *get_pointer(boost::interprocess::intrusive_ptr<T, VP> p)
+inline T *to_raw_pointer(boost::interprocess::intrusive_ptr<T, VP> p)
 { return p.get(); }
 #endif
 

Modified: branches/release/boost/interprocess/smart_ptr/scoped_ptr.hpp
==============================================================================
--- branches/release/boost/interprocess/smart_ptr/scoped_ptr.hpp (original)
+++ branches/release/boost/interprocess/smart_ptr/scoped_ptr.hpp 2011-12-26 12:21:36 EST (Mon, 26 Dec 2011)
@@ -18,6 +18,7 @@
 #include <boost/interprocess/detail/config_begin.hpp>
 #include <boost/interprocess/detail/workaround.hpp>
 #include <boost/interprocess/detail/pointer_type.hpp>
+#include <boost/interprocess/detail/utilities.hpp>
 #include <boost/assert.hpp>
 #include <boost/pointer_to_other.hpp>
 
@@ -82,7 +83,7 @@
    //!Deletes the object pointed to by the stored pointer and then
    //!stores a copy of p and a copy of d.
    void reset(const pointer &p, const Deleter &d) // never throws
- { BOOST_ASSERT(p == 0 || p != m_ptr); this_type(p).swap(*this); }
+ { BOOST_ASSERT(p == 0 || p != m_ptr); this_type(p, d).swap(*this); }
 
    //!Assigns internal pointer as 0 and returns previous pointer. This will
    //!avoid deletion on destructor
@@ -146,7 +147,7 @@
 //!Returns a copy of the stored pointer
 //!Never throws
 template<class T, class D> inline
-typename scoped_ptr<T, D>::pointer get_pointer(scoped_ptr<T, D> const & p)
+typename scoped_ptr<T, D>::pointer to_raw_pointer(scoped_ptr<T, D> const & p)
 { return p.get(); }
 
 } // namespace interprocess
@@ -155,7 +156,7 @@
 
 #if defined(_MSC_VER) && (_MSC_VER < 1400)
 template<class T, class D> inline
-T *get_pointer(boost::interprocess::scoped_ptr<T, D> const & p)
+T *to_raw_pointer(boost::interprocess::scoped_ptr<T, D> const & p)
 { return p.get(); }
 #endif
 

Modified: branches/release/boost/interprocess/smart_ptr/shared_ptr.hpp
==============================================================================
--- branches/release/boost/interprocess/smart_ptr/shared_ptr.hpp (original)
+++ branches/release/boost/interprocess/smart_ptr/shared_ptr.hpp 2011-12-26 12:21:36 EST (Mon, 26 Dec 2011)
@@ -4,7 +4,7 @@
 //
 // (C) Copyright Greg Colvin and Beman Dawes 1998, 1999.
 // (C) Copyright Peter Dimov 2001, 2002, 2003
-// (C) Copyright Ion Gaztanaga 2006-2009.
+// (C) Copyright Ion Gaztanaga 2006-2011.
 // 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)
@@ -24,7 +24,7 @@
 #include <boost/assert.hpp>
 #include <boost/interprocess/smart_ptr/detail/shared_count.hpp>
 #include <boost/interprocess/detail/mpl.hpp>
-#include <boost/interprocess/detail/move.hpp>
+#include <boost/move/move.hpp>
 #include <boost/interprocess/detail/type_traits.hpp>
 #include <boost/interprocess/allocators/allocator.hpp>
 #include <boost/interprocess/smart_ptr/deleter.hpp>
@@ -128,7 +128,7 @@
       typedef typename boost::pointer_to_other<pointer, T>::type ParameterPointer;
       BOOST_STATIC_ASSERT((ipcdetail::is_same<pointer, ParameterPointer>::value) ||
                           (ipcdetail::is_pointer<pointer>::value));
- ipcdetail::sp_enable_shared_from_this<T, VoidAllocator, Deleter>( m_pn, ipcdetail::get_pointer(p), ipcdetail::get_pointer(p) );
+ ipcdetail::sp_enable_shared_from_this<T, VoidAllocator, Deleter>( m_pn, ipcdetail::to_raw_pointer(p), ipcdetail::to_raw_pointer(p) );
    }
 
 
@@ -163,22 +163,22 @@
    /// @cond
    template<class Y>
    shared_ptr(shared_ptr<Y, VoidAllocator, Deleter> const & r, ipcdetail::static_cast_tag)
- : m_pn( pointer(static_cast<T*>(ipcdetail::get_pointer(r.m_pn.get_pointer())))
+ : m_pn( pointer(static_cast<T*>(ipcdetail::to_raw_pointer(r.m_pn.to_raw_pointer())))
              , r.m_pn)
    {}
 
    template<class Y>
    shared_ptr(shared_ptr<Y, VoidAllocator, Deleter> const & r, ipcdetail::const_cast_tag)
- : m_pn( pointer(const_cast<T*>(ipcdetail::get_pointer(r.m_pn.get_pointer())))
+ : m_pn( pointer(const_cast<T*>(ipcdetail::to_raw_pointer(r.m_pn.to_raw_pointer())))
              , r.m_pn)
    {}
 
    template<class Y>
    shared_ptr(shared_ptr<Y, VoidAllocator, Deleter> const & r, ipcdetail::dynamic_cast_tag)
- : m_pn( pointer(dynamic_cast<T*>(ipcdetail::get_pointer(r.m_pn.get_pointer())))
+ : m_pn( pointer(dynamic_cast<T*>(ipcdetail::to_raw_pointer(r.m_pn.to_raw_pointer())))
              , r.m_pn)
    {
- if(!m_pn.get_pointer()){ // need to allocate new counter -- the cast failed
+ if(!m_pn.to_raw_pointer()){ // need to allocate new counter -- the cast failed
          m_pn = ipcdetail::shared_count<T, VoidAllocator, Deleter>();
       }
    }
@@ -238,17 +238,17 @@
    //!Returns a reference to the
    //!pointed type
    reference operator* () const // never throws
- { BOOST_ASSERT(m_pn.get_pointer() != 0); return *m_pn.get_pointer(); }
+ { BOOST_ASSERT(m_pn.to_raw_pointer() != 0); return *m_pn.to_raw_pointer(); }
 
    //!Returns the pointer pointing
    //!to the owned object
    pointer operator-> () const // never throws
- { BOOST_ASSERT(m_pn.get_pointer() != 0); return m_pn.get_pointer(); }
+ { BOOST_ASSERT(m_pn.to_raw_pointer() != 0); return m_pn.to_raw_pointer(); }
 
    //!Returns the pointer pointing
    //!to the owned object
    pointer get() const // never throws
- { return m_pn.get_pointer(); }
+ { return m_pn.to_raw_pointer(); }
 
    /// @cond
    // implicit conversion to "bool"
@@ -256,13 +256,13 @@
    typedef void (this_type::*unspecified_bool_type)() const;
 
    operator unspecified_bool_type() const // never throws
- { return !m_pn.get_pointer() ? 0 : &this_type::unspecified_bool_type_func; }
+ { return !m_pn.to_raw_pointer() ? 0 : &this_type::unspecified_bool_type_func; }
    /// @endcond
 
    //!Not operator.
    //!Returns true if this->get() != 0, false otherwise
    bool operator! () const // never throws
- { return !m_pn.get_pointer(); }
+ { return !m_pn.to_raw_pointer(); }
 
    //!Returns use_count() == 1.
    //!unique() might be faster than use_count()
@@ -331,9 +331,9 @@
 shared_ptr<T, VoidAllocator, Deleter> dynamic_pointer_cast(shared_ptr<U, VoidAllocator, Deleter> const & r)
 { return shared_ptr<T, VoidAllocator, Deleter>(r, ipcdetail::dynamic_cast_tag()); }
 
-// get_pointer() enables boost::mem_fn to recognize shared_ptr
+// to_raw_pointer() enables boost::mem_fn to recognize shared_ptr
 template<class T, class VoidAllocator, class Deleter> inline
-T * get_pointer(shared_ptr<T, VoidAllocator, Deleter> const & p)
+T * to_raw_pointer(shared_ptr<T, VoidAllocator, Deleter> const & p)
 { return p.get(); }
 
 // operator<<
@@ -394,9 +394,9 @@
 /// @cond
 
 #if defined(_MSC_VER) && (_MSC_VER < 1400)
-// get_pointer() enables boost::mem_fn to recognize shared_ptr
+// to_raw_pointer() enables boost::mem_fn to recognize shared_ptr
 template<class T, class VoidAllocator, class Deleter> inline
-T * get_pointer(boost::interprocess::shared_ptr<T, VoidAllocator, Deleter> const & p)
+T * to_raw_pointer(boost::interprocess::shared_ptr<T, VoidAllocator, Deleter> const & p)
 { return p.get(); }
 #endif
 

Modified: branches/release/boost/interprocess/smart_ptr/unique_ptr.hpp
==============================================================================
--- branches/release/boost/interprocess/smart_ptr/unique_ptr.hpp (original)
+++ branches/release/boost/interprocess/smart_ptr/unique_ptr.hpp 2011-12-26 12:21:36 EST (Mon, 26 Dec 2011)
@@ -21,7 +21,7 @@
 #include <boost/assert.hpp>
 #include <boost/interprocess/detail/utilities.hpp>
 #include <boost/interprocess/detail/pointer_type.hpp>
-#include <boost/interprocess/detail/move.hpp>
+#include <boost/move/move.hpp>
 #include <boost/compressed_pair.hpp>
 #include <boost/static_assert.hpp>
 #include <boost/interprocess/detail/mpl.hpp>
@@ -143,7 +143,7 @@
    //!
    //!After the construction, u no longer owns a pointer.
    //![ Note: The deleter constructor can be implemented with
- //! boost::interprocess::forward<D>. -end note ]
+ //! boost::forward<D>. -end note ]
    //!
    //!Postconditions: get() == value u.get() had before the construction.
    //!get_deleter() returns a reference to the internally stored deleter which
@@ -152,7 +152,7 @@
    //!
    //!Throws: nothing.
    unique_ptr(BOOST_RV_REF(unique_ptr) u)
- : ptr_(u.release(), boost::interprocess::forward<D>(u.get_deleter()))
+ : ptr_(u.release(), boost::forward<D>(u.get_deleter()))
    {}
 
    //!Requires: If D is not a reference type, construction of the deleter
@@ -186,7 +186,7 @@
             ,
             nat
>::type = nat())
- : ptr_(const_cast<unique_ptr<U,E>&>(u).release(), boost::interprocess::move<D>(u.get_deleter()))
+ : ptr_(const_cast<unique_ptr<U,E>&>(u).release(), boost::move<D>(u.get_deleter()))
    {}
 
    //!Effects: If get() == 0 there are no effects. Otherwise get_deleter()(get()).
@@ -211,7 +211,7 @@
    unique_ptr& operator=(BOOST_RV_REF(unique_ptr) u)
    {
       reset(u.release());
- ptr_.second() = boost::interprocess::move(u.get_deleter());
+ ptr_.second() = boost::move(u.get_deleter());
       return *this;
    }
 
@@ -233,7 +233,7 @@
    unique_ptr& operator=(BOOST_RV_REF_2_TEMPL_ARGS(unique_ptr, U, E) u)
    {
       reset(u.release());
- ptr_.second() = boost::interprocess::move(u.get_deleter());
+ ptr_.second() = boost::move(u.get_deleter());
       return *this;
    }
 

Modified: branches/release/boost/interprocess/smart_ptr/weak_ptr.hpp
==============================================================================
--- branches/release/boost/interprocess/smart_ptr/weak_ptr.hpp (original)
+++ branches/release/boost/interprocess/smart_ptr/weak_ptr.hpp 2011-12-26 12:21:36 EST (Mon, 26 Dec 2011)
@@ -3,7 +3,7 @@
 // This file is the adaptation for Interprocess of boost/weak_ptr.hpp
 //
 // (C) Copyright Peter Dimov 2001, 2002, 2003
-// (C) Copyright Ion Gaztanaga 2006-2009.
+// (C) Copyright Ion Gaztanaga 2006-2011.
 // 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)

Deleted: branches/release/boost/interprocess/sync/interprocess_barrier.hpp
==============================================================================
--- branches/release/boost/interprocess/sync/interprocess_barrier.hpp 2011-12-26 12:21:36 EST (Mon, 26 Dec 2011)
+++ (empty file)
@@ -1,115 +0,0 @@
-//////////////////////////////////////////////////////////////////////////////
-//
-// (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)
-//
-// See http://www.boost.org/libs/interprocess for documentation.
-//
-//////////////////////////////////////////////////////////////////////////////
-//
-// barrier is a modified version of Boost Threads barrier
-//
-//////////////////////////////////////////////////////////////////////////////
-//
-// Copyright (C) 2002-2003
-// David Moore, William E. Kempf
-//
-// Permission to use, copy, modify, distribute and sell this software
-// and its documentation for any purpose is hereby granted without fee,
-// provided that the above copyright notice appear in all copies and
-// that both that copyright notice and this permission notice appear
-// in supporting documentation. William E. Kempf makes no representations
-// about the suitability of this software for any purpose.
-// It is provided "as is" without express or implied warranty.
-
-#ifndef BOOST_INTERPROCESS_BARRIER_HPP
-#define BOOST_INTERPROCESS_BARRIER_HPP
-
-/// @cond
-
-#if (defined _MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif
-
-#include <boost/interprocess/detail/config_begin.hpp>
-#include <boost/interprocess/detail/workaround.hpp>
-
-#if defined BOOST_INTERPROCESS_POSIX_PROCESS_SHARED && defined BOOST_INTERPROCESS_POSIX_BARRIERS
-# include <pthread.h>
-# include <errno.h>
-# include <boost/interprocess/sync/posix/pthread_helpers.hpp>
-# define BOOST_INTERPROCESS_USE_POSIX
-#else
-# include <boost/interprocess/sync/interprocess_mutex.hpp>
-# include <boost/interprocess/sync/scoped_lock.hpp>
-# include <boost/interprocess/sync/interprocess_condition.hpp>
-# include <stdexcept>
-# define BOOST_INTERPROCESS_USE_GENERIC_EMULATION
-#endif
-
-# include <boost/interprocess/exceptions.hpp>
-
-/// @endcond
-
-namespace boost {
-namespace interprocess {
-
-//!An object of class barrier is a synchronization primitive that
-//!can be placed in shared memory used to cause a set of threads from
-//!different processes to wait until they each perform a certain
-//!function or each reach a particular point in their execution.
-class barrier
-{
- public:
- //!Constructs a barrier object that will cause count threads
- //!to block on a call to wait().
- barrier(unsigned int count);
-
- //!Destroys *this. If threads are still executing their wait()
- //!operations, the behavior for these threads is undefined.
- ~barrier();
-
- //!Effects: Wait until N threads call wait(), where N equals the count
- //!provided to the constructor for the barrier object.
- //!Note that if the barrier is destroyed before wait() can return,
- //!the behavior is undefined.
- //!Returns: Exactly one of the N threads will receive a return value
- //!of true, the others will receive a value of false. Precisely which
- //!thread receives the return value of true will be implementation-defined.
- //!Applications can use this value to designate one thread as a leader that
- //!will take a certain action, and the other threads emerging from the barrier
- //!can wait for that action to take place.
- bool wait();
-
- /// @cond
- private:
- #if defined(BOOST_INTERPROCESS_USE_GENERIC_EMULATION)
- interprocess_mutex m_mutex;
- interprocess_condition m_cond;
- unsigned int m_threshold;
- unsigned int m_count;
- unsigned int m_generation;
- #else //#if defined BOOST_INTERPROCESS_USE_POSIX
- pthread_barrier_t m_barrier;
- #endif//#if defined BOOST_INTERPROCESS_USE_POSIX
- /// @endcond
-};
-
-} // namespace interprocess
-} // namespace boost
-
-
-#ifdef BOOST_INTERPROCESS_USE_GENERIC_EMULATION
-# undef BOOST_INTERPROCESS_USE_GENERIC_EMULATION
-# include <boost/interprocess/sync/emulation/interprocess_barrier.hpp>
-#endif
-
-#ifdef BOOST_INTERPROCESS_USE_POSIX
-# undef BOOST_INTERPROCESS_USE_POSIX
-# include <boost/interprocess/sync/posix/interprocess_barrier.hpp>
-#endif
-
-#include <boost/interprocess/detail/config_end.hpp>
-
-#endif

Modified: branches/release/boost/interprocess/sync/interprocess_mutex.hpp
==============================================================================
--- branches/release/boost/interprocess/sync/interprocess_mutex.hpp (original)
+++ branches/release/boost/interprocess/sync/interprocess_mutex.hpp 2011-12-26 12:21:36 EST (Mon, 26 Dec 2011)
@@ -1,6 +1,6 @@
 //////////////////////////////////////////////////////////////////////////////
 //
-// (C) Copyright Ion Gaztanaga 2005-2009. Distributed under the Boost
+// (C) Copyright Ion Gaztanaga 2005-2011. 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,19 +21,21 @@
 # pragma once
 #endif
 
-#include <boost/interprocess/exceptions.hpp>
 #include <boost/interprocess/detail/config_begin.hpp>
+#include <boost/interprocess/exceptions.hpp>
 #include <boost/interprocess/detail/workaround.hpp>
 #include <boost/interprocess/detail/posix_time_types_wrk.hpp>
 #include <boost/assert.hpp>
 
 #if !defined(BOOST_INTERPROCESS_FORCE_GENERIC_EMULATION) && defined (BOOST_INTERPROCESS_POSIX_PROCESS_SHARED)
- #include <pthread.h>
- #include <errno.h>
- #include <boost/interprocess/sync/posix/pthread_helpers.hpp>
+ #include <boost/interprocess/sync/posix/mutex.hpp>
    #define BOOST_INTERPROCESS_USE_POSIX
+//Experimental...
+//#elif !defined(BOOST_INTERPROCESS_FORCE_GENERIC_EMULATION) && defined (BOOST_INTERPROCESS_WINDOWS)
+// #include <boost/interprocess/sync/windows/mutex.hpp>
+// #define BOOST_INTERPROCESS_USE_WINDOWS
 #else
- #include <boost/interprocess/sync/emulation/mutex.hpp>
+ #include <boost/interprocess/sync/spin/mutex.hpp>
    #define BOOST_INTERPROCESS_USE_GENERIC_EMULATION
 
 namespace boost {
@@ -108,54 +110,60 @@
    /// @cond
    private:
 
- #if defined(BOOST_INTERPROCESS_USE_GENERIC_EMULATION)
- friend class ipcdetail::robust_emulation_helpers::mutex_traits<interprocess_mutex>;
- void take_ownership(){ mutex.take_ownership(); }
- ipcdetail::emulation_mutex mutex;
+ #if defined(BOOST_INTERPROCESS_USE_GENERIC_EMULATION)
+ #undef BOOST_INTERPROCESS_USE_GENERIC_EMULATION
+ friend class ipcdetail::robust_emulation_helpers::mutex_traits<interprocess_mutex>;
+ void take_ownership(){ mutex.take_ownership(); }
+ ipcdetail::spin_mutex mutex;
    #elif defined(BOOST_INTERPROCESS_USE_POSIX)
- pthread_mutex_t m_mut;
- #endif //#if (defined BOOST_INTERPROCESS_WINDOWS)
+ #undef BOOST_INTERPROCESS_USE_POSIX
+ ipcdetail::posix_mutex mutex;
+ #elif defined(BOOST_INTERPROCESS_USE_WINDOWS)
+ #undef BOOST_INTERPROCESS_USE_WINDOWS
+ ipcdetail::windows_mutex mutex;
+ #else
+ #error "Unknown platform for interprocess_mutex"
+ #endif
    /// @endcond
 };
 
 } //namespace interprocess {
 } //namespace boost {
 
-#ifdef BOOST_INTERPROCESS_USE_GENERIC_EMULATION
-# undef BOOST_INTERPROCESS_USE_GENERIC_EMULATION
 
 namespace boost {
 namespace interprocess {
 
 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
- = boost::posix_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
+ #ifdef BOOST_INTERPROCESS_ENABLE_TIMEOUT_WHEN_LOCKING
+ boost::posix_time::ptime wait_time
+ = boost::posix_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
 }
-inline bool interprocess_mutex::try_lock(){ return mutex.try_lock(); }
-inline bool interprocess_mutex::timed_lock(const boost::posix_time::ptime &abs_time){ return mutex.timed_lock(abs_time); }
-inline void interprocess_mutex::unlock(){ mutex.unlock(); }
 
-} //namespace interprocess {
-} //namespace boost {
+inline bool interprocess_mutex::try_lock()
+{ return mutex.try_lock(); }
 
-#endif
+inline bool interprocess_mutex::timed_lock(const boost::posix_time::ptime &abs_time)
+{ return mutex.timed_lock(abs_time); }
 
-#ifdef BOOST_INTERPROCESS_USE_POSIX
-#include <boost/interprocess/sync/posix/interprocess_mutex.hpp>
-# undef BOOST_INTERPROCESS_USE_POSIX
-#endif
+inline void interprocess_mutex::unlock()
+{ mutex.unlock(); }
+
+} //namespace interprocess {
+} //namespace boost {
 
 #include <boost/interprocess/detail/config_end.hpp>
 

Modified: branches/release/boost/interprocess/sync/interprocess_recursive_mutex.hpp
==============================================================================
--- branches/release/boost/interprocess/sync/interprocess_recursive_mutex.hpp (original)
+++ branches/release/boost/interprocess/sync/interprocess_recursive_mutex.hpp 2011-12-26 12:21:36 EST (Mon, 26 Dec 2011)
@@ -1,6 +1,6 @@
 //////////////////////////////////////////////////////////////////////////////
 //
-// (C) Copyright Ion Gaztanaga 2005-2009. Distributed under the Boost
+// (C) Copyright Ion Gaztanaga 2005-2011. 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)
 //
@@ -40,12 +40,14 @@
 
 #if !defined(BOOST_INTERPROCESS_FORCE_GENERIC_EMULATION) && \
    (defined(BOOST_INTERPROCESS_POSIX_PROCESS_SHARED) && defined (BOOST_INTERPROCESS_POSIX_RECURSIVE_MUTEXES))
- #include <pthread.h>
- #include <errno.h>
- #include <boost/interprocess/sync/posix/pthread_helpers.hpp>
+ #include <boost/interprocess/sync/posix/recursive_mutex.hpp>
    #define BOOST_INTERPROCESS_USE_POSIX
+//Experimental...
+//#elif !defined(BOOST_INTERPROCESS_FORCE_GENERIC_EMULATION) && defined (BOOST_INTERPROCESS_WINDOWS)
+// #include <boost/interprocess/sync/windows/recursive_mutex.hpp>
+// #define BOOST_INTERPROCESS_USE_WINDOWS
 #else
- #include <boost/interprocess/sync/emulation/recursive_mutex.hpp>
+ #include <boost/interprocess/sync/spin/recursive_mutex.hpp>
    #define BOOST_INTERPROCESS_USE_GENERIC_EMULATION
 #endif
 
@@ -118,53 +120,57 @@
    private:
 
    #if defined (BOOST_INTERPROCESS_USE_GENERIC_EMULATION)
- void take_ownership(){ mutex.take_ownership(); }
- friend class ipcdetail::robust_emulation_helpers::mutex_traits<interprocess_recursive_mutex>;
- ipcdetail::emulation_recursive_mutex mutex;
- #else //#if defined (BOOST_INTERPROCESS_USE_GENERIC_EMULATION)
- pthread_mutex_t m_mut;
- #endif //#if (defined BOOST_INTERPROCESS_WINDOWS)
+ #undef BOOST_INTERPROCESS_USE_GENERIC_EMULATION
+ void take_ownership(){ mutex.take_ownership(); }
+ friend class ipcdetail::robust_emulation_helpers::mutex_traits<interprocess_recursive_mutex>;
+ ipcdetail::spin_recursive_mutex mutex;
+ #elif defined(BOOST_INTERPROCESS_USE_POSIX)
+ #undef BOOST_INTERPROCESS_USE_POSIX
+ ipcdetail::posix_recursive_mutex mutex;
+ #elif defined(BOOST_INTERPROCESS_USE_WINDOWS)
+ #undef BOOST_INTERPROCESS_USE_WINDOWS
+ ipcdetail::windows_recursive_mutex mutex;
+ #else
+ #error "Unknown platform for interprocess_mutex"
+ #endif
    /// @endcond
 };
 
 } //namespace interprocess {
 } //namespace boost {
 
-#ifdef BOOST_INTERPROCESS_USE_GENERIC_EMULATION
-# undef BOOST_INTERPROCESS_USE_GENERIC_EMULATION
-
 namespace boost {
 namespace interprocess {
 
 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
- = boost::posix_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
+ #ifdef BOOST_INTERPROCESS_ENABLE_TIMEOUT_WHEN_LOCKING
+ boost::posix_time::ptime wait_time
+ = boost::posix_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
 }
-inline bool interprocess_recursive_mutex::try_lock(){ return mutex.try_lock(); }
-inline bool interprocess_recursive_mutex::timed_lock(const boost::posix_time::ptime &abs_time){ return mutex.timed_lock(abs_time); }
-inline void interprocess_recursive_mutex::unlock(){ mutex.unlock(); }
 
-} //namespace interprocess {
-} //namespace boost {
+inline bool interprocess_recursive_mutex::try_lock()
+{ return mutex.try_lock(); }
 
-#endif
+inline bool interprocess_recursive_mutex::timed_lock(const boost::posix_time::ptime &abs_time)
+{ return mutex.timed_lock(abs_time); }
 
-#ifdef BOOST_INTERPROCESS_USE_POSIX
-# undef BOOST_INTERPROCESS_USE_POSIX
-#include <boost/interprocess/sync/posix/interprocess_recursive_mutex.hpp>
-#endif
+inline void interprocess_recursive_mutex::unlock()
+{ mutex.unlock(); }
+
+} //namespace interprocess {
+} //namespace boost {
 
 #include <boost/interprocess/detail/config_end.hpp>
 

Modified: branches/release/boost/interprocess/sync/lock_options.hpp
==============================================================================
--- branches/release/boost/interprocess/sync/lock_options.hpp (original)
+++ branches/release/boost/interprocess/sync/lock_options.hpp 2011-12-26 12:21:36 EST (Mon, 26 Dec 2011)
@@ -1,6 +1,6 @@
 //////////////////////////////////////////////////////////////////////////////
 //
-// (C) Copyright Ion Gaztanaga 2005-2009. Distributed under the Boost
+// (C) Copyright Ion Gaztanaga 2005-2011. 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)
 //

Modified: branches/release/boost/interprocess/sync/mutex_family.hpp
==============================================================================
--- branches/release/boost/interprocess/sync/mutex_family.hpp (original)
+++ branches/release/boost/interprocess/sync/mutex_family.hpp 2011-12-26 12:21:36 EST (Mon, 26 Dec 2011)
@@ -1,6 +1,6 @@
 //////////////////////////////////////////////////////////////////////////////
 //
-// (C) Copyright Ion Gaztanaga 2005-2009. Distributed under the Boost
+// (C) Copyright Ion Gaztanaga 2005-2011. 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)
 //

Modified: branches/release/boost/interprocess/sync/named_condition.hpp
==============================================================================
--- branches/release/boost/interprocess/sync/named_condition.hpp (original)
+++ branches/release/boost/interprocess/sync/named_condition.hpp 2011-12-26 12:21:36 EST (Mon, 26 Dec 2011)
@@ -1,6 +1,6 @@
 //////////////////////////////////////////////////////////////////////////////
 //
-// (C) Copyright Ion Gaztanaga 2005-2009. Distributed under the Boost
+// (C) Copyright Ion Gaztanaga 2005-2011. 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)
 //
@@ -17,25 +17,15 @@
 
 #include <boost/interprocess/detail/config_begin.hpp>
 #include <boost/interprocess/detail/workaround.hpp>
-#include <boost/static_assert.hpp>
-#include <boost/interprocess/detail/type_traits.hpp>
 #include <boost/interprocess/creation_tags.hpp>
 #include <boost/interprocess/exceptions.hpp>
-#include <boost/interprocess/shared_memory_object.hpp>
-#include <boost/interprocess/sync/interprocess_condition.hpp>
-#include <boost/interprocess/detail/managed_open_or_create_impl.hpp>
-#include <boost/interprocess/detail/posix_time_types_wrk.hpp>
-#include <boost/interprocess/sync/emulation/named_creation_functor.hpp>
-#include <boost/interprocess/sync/named_mutex.hpp>
+#include <boost/interprocess/detail/interprocess_tester.hpp>
 #include <boost/interprocess/permissions.hpp>
-#if defined BOOST_INTERPROCESS_NAMED_MUTEX_USES_POSIX_SEMAPHORES
-#include <boost/interprocess/sync/interprocess_mutex.hpp>
-#include <boost/interprocess/sync/scoped_lock.hpp>
-#endif
-
+#include <boost/interprocess/detail/posix_time_types_wrk.hpp>
+#include <boost/interprocess/sync/shm/named_condition.hpp>
 
 //!\file
-//!Describes process-shared variables interprocess_condition class
+//!Describes a named condition class for inter-process synchronization
 
 namespace boost {
 namespace interprocess {
@@ -120,78 +110,11 @@
 
    /// @cond
    private:
-
- struct condition_holder
- {
- interprocess_condition cond_;
- //If named_mutex is implemented using semaphores
- //we need to store an additional mutex
- #if defined (BOOST_INTERPROCESS_NAMED_MUTEX_USES_POSIX_SEMAPHORES)
- interprocess_mutex mutex_;
- #endif
- };
-
- interprocess_condition *condition() const
- { return &static_cast<condition_holder*>(m_shmem.get_user_address())->cond_; }
-
- template <class Lock>
- class lock_inverter
- {
- Lock &l_;
- public:
- lock_inverter(Lock &l)
- : l_(l)
- {}
- void lock() { l_.unlock(); }
- void unlock() { l_.lock(); }
- };
-
- #if defined (BOOST_INTERPROCESS_NAMED_MUTEX_USES_POSIX_SEMAPHORES)
- interprocess_mutex *mutex() const
- { return &static_cast<condition_holder*>(m_shmem.get_user_address())->mutex_; }
-
- template <class Lock>
- void do_wait(Lock& lock)
- {
- //named_condition only works with named_mutex
- BOOST_STATIC_ASSERT((ipcdetail::is_convertible<typename Lock::mutex_type&, named_mutex&>::value == true));
-
- //lock internal before unlocking external to avoid race with a notifier
- scoped_lock<interprocess_mutex> internal_lock(*this->mutex());
- lock_inverter<Lock> inverted_lock(lock);
- scoped_lock<lock_inverter<Lock> > external_unlock(inverted_lock);
-
- //unlock internal first to avoid deadlock with near simultaneous waits
- scoped_lock<interprocess_mutex> internal_unlock;
- internal_lock.swap(internal_unlock);
- this->condition()->wait(internal_unlock);
- }
-
- template <class Lock>
- bool do_timed_wait(Lock& lock, const boost::posix_time::ptime &abs_time)
- {
- //named_condition only works with named_mutex
- BOOST_STATIC_ASSERT((ipcdetail::is_convertible<typename Lock::mutex_type&, named_mutex&>::value == true));
- //lock internal before unlocking external to avoid race with a notifier
- scoped_lock<interprocess_mutex> internal_lock(*this->mutex(), abs_time);
- if(!internal_lock) return false;
- lock_inverter<Lock> inverted_lock(lock);
- scoped_lock<lock_inverter<Lock> > external_unlock(inverted_lock);
-
- //unlock internal first to avoid deadlock with near simultaneous waits
- scoped_lock<interprocess_mutex> internal_unlock;
- internal_lock.swap(internal_unlock);
- return this->condition()->timed_wait(internal_unlock, abs_time);
- }
- #endif
+ ipcdetail::shm_named_condition m_cond;
 
    friend class ipcdetail::interprocess_tester;
- void dont_close_on_destruction();
-
- ipcdetail::managed_open_or_create_impl<shared_memory_object> m_shmem;
-
- template <class T, class Arg> friend class boost::interprocess::ipcdetail::named_creation_functor;
- typedef ipcdetail::named_creation_functor<condition_holder> construct_func_t;
+ void dont_close_on_destruction()
+ { ipcdetail::interprocess_tester::dont_close_on_destruction(m_cond); }
    /// @endcond
 };
 
@@ -201,165 +124,43 @@
 {}
 
 inline named_condition::named_condition(create_only_t, const char *name, const permissions &perm)
- : m_shmem (create_only
- ,name
- ,sizeof(condition_holder) +
- ipcdetail::managed_open_or_create_impl<shared_memory_object>::
- ManagedOpenOrCreateUserOffset
- ,read_write
- ,0
- ,construct_func_t(ipcdetail::DoCreate)
- ,perm)
+ : m_cond(create_only_t(), name, perm)
 {}
 
 inline named_condition::named_condition(open_or_create_t, const char *name, const permissions &perm)
- : m_shmem (open_or_create
- ,name
- ,sizeof(condition_holder) +
- ipcdetail::managed_open_or_create_impl<shared_memory_object>::
- ManagedOpenOrCreateUserOffset
- ,read_write
- ,0
- ,construct_func_t(ipcdetail::DoOpenOrCreate)
- ,perm)
+ : m_cond(open_or_create_t(), name, perm)
 {}
 
 inline named_condition::named_condition(open_only_t, const char *name)
- : m_shmem (open_only
- ,name
- ,read_write
- ,0
- ,construct_func_t(ipcdetail::DoOpen))
+ : m_cond(open_only_t(), name)
 {}
 
-inline void named_condition::dont_close_on_destruction()
-{ ipcdetail::interprocess_tester::dont_close_on_destruction(m_shmem); }
-
-#if defined(BOOST_INTERPROCESS_NAMED_MUTEX_USES_POSIX_SEMAPHORES)
-
-inline void named_condition::notify_one()
-{
- scoped_lock<interprocess_mutex> internal_lock(*this->mutex());
- this->condition()->notify_one();
-}
-
-inline void named_condition::notify_all()
-{
- scoped_lock<interprocess_mutex> internal_lock(*this->mutex());
- this->condition()->notify_all();
-}
-
-template <typename L>
-inline void named_condition::wait(L& lock)
-{
- if (!lock)
- throw lock_exception();
- this->do_wait(lock);
-}
-
-template <typename L, typename Pr>
-inline void named_condition::wait(L& lock, Pr pred)
-{
- if (!lock)
- throw lock_exception();
- while (!pred())
- this->do_wait(lock);
-}
-
-template <typename L>
-inline bool named_condition::timed_wait
- (L& lock, const boost::posix_time::ptime &abs_time)
-{
- if(abs_time == boost::posix_time::pos_infin){
- this->wait(lock);
- return true;
- }
- if (!lock)
- throw lock_exception();
- return this->do_timed_wait(lock, abs_time);
-}
-
-template <typename L, typename Pr>
-inline bool named_condition::timed_wait
- (L& lock, const boost::posix_time::ptime &abs_time, Pr pred)
-{
- if(abs_time == boost::posix_time::pos_infin){
- this->wait(lock, pred);
- return true;
- }
- if (!lock)
- throw lock_exception();
-
- while (!pred()){
- if(!this->do_timed_wait(lock, abs_time)){
- return pred();
- }
- }
- return true;
-}
-
-#else
-
 inline void named_condition::notify_one()
-{ this->condition()->notify_one(); }
+{ m_cond.notify_one(); }
 
 inline void named_condition::notify_all()
-{ this->condition()->notify_all(); }
+{ m_cond.notify_all(); }
 
 template <typename L>
 inline void named_condition::wait(L& lock)
-{
- if (!lock)
- throw lock_exception();
- this->condition()->do_wait(*lock.mutex()->mutex());
-}
+{ m_cond.wait(lock); }
 
 template <typename L, typename Pr>
 inline void named_condition::wait(L& lock, Pr pred)
-{
- if (!lock)
- throw lock_exception();
-
- while (!pred())
- this->condition()->do_wait(*lock.mutex()->mutex());
-}
+{ m_cond.wait(lock, pred); }
 
 template <typename L>
 inline bool named_condition::timed_wait
    (L& lock, const boost::posix_time::ptime &abs_time)
-{
- if(abs_time == boost::posix_time::pos_infin){
- this->wait(lock);
- return true;
- }
- if (!lock)
- throw lock_exception();
- return this->condition()->do_timed_wait(abs_time, *lock.mutex()->mutex());
-}
+{ return m_cond.timed_wait(lock, abs_time); }
 
 template <typename L, typename Pr>
 inline bool named_condition::timed_wait
    (L& lock, const boost::posix_time::ptime &abs_time, Pr pred)
-{
- if(abs_time == boost::posix_time::pos_infin){
- this->wait(lock, pred);
- return true;
- }
- if (!lock)
- throw lock_exception();
-
- while (!pred()){
- if (!this->condition()->do_timed_wait(abs_time, *lock.mutex()->mutex()))
- return pred();
- }
-
- return true;
-}
-
-#endif
+{ return m_cond.timed_wait(lock, abs_time, pred); }
 
 inline bool named_condition::remove(const char *name)
-{ return shared_memory_object::remove(name); }
+{ return ipcdetail::shm_named_condition::remove(name); }
 
 /// @endcond
 

Modified: branches/release/boost/interprocess/sync/named_mutex.hpp
==============================================================================
--- branches/release/boost/interprocess/sync/named_mutex.hpp (original)
+++ branches/release/boost/interprocess/sync/named_mutex.hpp 2011-12-26 12:21:36 EST (Mon, 26 Dec 2011)
@@ -1,6 +1,6 @@
 //////////////////////////////////////////////////////////////////////////////
 //
-// (C) Copyright Ion Gaztanaga 2005-2009. Distributed under the Boost
+// (C) Copyright Ion Gaztanaga 2005-2011. 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)
 //
@@ -19,17 +19,14 @@
 #include <boost/interprocess/detail/workaround.hpp>
 #include <boost/interprocess/creation_tags.hpp>
 #include <boost/interprocess/exceptions.hpp>
-#include <boost/interprocess/sync/emulation/named_creation_functor.hpp>
 #include <boost/interprocess/detail/interprocess_tester.hpp>
+#include <boost/interprocess/detail/posix_time_types_wrk.hpp>
 #include <boost/interprocess/permissions.hpp>
 
 #if defined(BOOST_INTERPROCESS_NAMED_MUTEX_USES_POSIX_SEMAPHORES)
- #include <boost/interprocess/sync/posix/semaphore_wrapper.hpp>
+#include <boost/interprocess/sync/posix/named_mutex.hpp>
 #else
- #include <boost/interprocess/shared_memory_object.hpp>
- #include <boost/interprocess/sync/interprocess_mutex.hpp>
- #include <boost/interprocess/detail/managed_open_or_create_impl.hpp>
- #include <boost/interprocess/detail/posix_time_types_wrk.hpp>
+#include <boost/interprocess/sync/shm/named_mutex.hpp>
 #endif
 
 //!\file
@@ -108,122 +105,53 @@
    void dont_close_on_destruction();
 
    #if defined(BOOST_INTERPROCESS_NAMED_MUTEX_USES_POSIX_SEMAPHORES)
- ipcdetail::named_semaphore_wrapper m_sem;
+ typedef ipcdetail::posix_named_mutex impl_t;
+ impl_t m_mut;
    #else
+ typedef ipcdetail::shm_named_mutex impl_t;
+ impl_t m_mut;
+ public:
    interprocess_mutex *mutex() const
- { return static_cast<interprocess_mutex*>(m_shmem.get_user_address()); }
-
- ipcdetail::managed_open_or_create_impl<shared_memory_object> m_shmem;
- typedef ipcdetail::named_creation_functor<interprocess_mutex> construct_func_t;
+ { return m_mut.mutex(); }
    #endif
+
    /// @endcond
 };
 
 /// @cond
 
-#if defined(BOOST_INTERPROCESS_NAMED_MUTEX_USES_POSIX_SEMAPHORES)
-
 inline named_mutex::named_mutex(create_only_t, const char *name, const permissions &perm)
- : m_sem(ipcdetail::DoCreate, name, 1, perm)
+ : m_mut(create_only_t(), name, perm)
 {}
 
 inline named_mutex::named_mutex(open_or_create_t, const char *name, const permissions &perm)
- : m_sem(ipcdetail::DoOpenOrCreate, name, 1, perm)
+ : m_mut(open_or_create_t(), name, perm)
 {}
 
 inline named_mutex::named_mutex(open_only_t, const char *name)
- : m_sem(ipcdetail::DoOpen, name, 1, permissions())
+ : m_mut(open_only_t(), name)
 {}
 
 inline void named_mutex::dont_close_on_destruction()
-{ ipcdetail::interprocess_tester::dont_close_on_destruction(m_sem); }
+{ ipcdetail::interprocess_tester::dont_close_on_destruction(m_mut); }
 
 inline named_mutex::~named_mutex()
 {}
 
 inline void named_mutex::lock()
-{ m_sem.wait(); }
+{ m_mut.lock(); }
 
 inline void named_mutex::unlock()
-{ m_sem.post(); }
+{ m_mut.unlock(); }
 
 inline bool named_mutex::try_lock()
-{ return m_sem.try_wait(); }
+{ return m_mut.try_lock(); }
 
 inline bool named_mutex::timed_lock(const boost::posix_time::ptime &abs_time)
-{
- if(abs_time == boost::posix_time::pos_infin){
- this->lock();
- return true;
- }
- return m_sem.timed_wait(abs_time);
-}
+{ return m_mut.timed_lock(abs_time); }
 
 inline bool named_mutex::remove(const char *name)
-{ return ipcdetail::named_semaphore_wrapper::remove(name); }
-
-#else
-
-inline void named_mutex::dont_close_on_destruction()
-{ ipcdetail::interprocess_tester::dont_close_on_destruction(m_shmem); }
-
-inline named_mutex::~named_mutex()
-{}
-
-inline named_mutex::named_mutex(create_only_t, const char *name, const permissions &perm)
- : m_shmem (create_only
- ,name
- ,sizeof(interprocess_mutex) +
- ipcdetail::managed_open_or_create_impl<shared_memory_object>::
- ManagedOpenOrCreateUserOffset
- ,read_write
- ,0
- ,construct_func_t(ipcdetail::DoCreate)
- ,perm)
-{}
-
-inline named_mutex::named_mutex(open_or_create_t, const char *name, const permissions &perm)
- : m_shmem (open_or_create
- ,name
- ,sizeof(interprocess_mutex) +
- ipcdetail::managed_open_or_create_impl<shared_memory_object>::
- ManagedOpenOrCreateUserOffset
- ,read_write
- ,0
- ,construct_func_t(ipcdetail::DoOpenOrCreate)
- ,perm)
-{}
-
-inline named_mutex::named_mutex(open_only_t, const char *name)
- : m_shmem (open_only
- ,name
- ,read_write
- ,0
- ,construct_func_t(ipcdetail::DoOpen))
-{}
-
-inline void named_mutex::lock()
-{ this->mutex()->lock(); }
-
-inline void named_mutex::unlock()
-{ this->mutex()->unlock(); }
-
-inline bool named_mutex::try_lock()
-{ return this->mutex()->try_lock(); }
-
-inline bool named_mutex::timed_lock(const boost::posix_time::ptime &abs_time)
-{
- if(abs_time == boost::posix_time::pos_infin){
- this->lock();
- return true;
- }
- return this->mutex()->timed_lock(abs_time);
-}
-
-inline bool named_mutex::remove(const char *name)
-{ return shared_memory_object::remove(name); }
-
-#endif
+{ return impl_t::remove(name); }
 
 /// @endcond
 

Modified: branches/release/boost/interprocess/sync/named_recursive_mutex.hpp
==============================================================================
--- branches/release/boost/interprocess/sync/named_recursive_mutex.hpp (original)
+++ branches/release/boost/interprocess/sync/named_recursive_mutex.hpp 2011-12-26 12:21:36 EST (Mon, 26 Dec 2011)
@@ -1,6 +1,6 @@
 //////////////////////////////////////////////////////////////////////////////
 //
-// (C) Copyright Ion Gaztanaga 2005-2009. Distributed under the Boost
+// (C) Copyright Ion Gaztanaga 2005-2011. 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)
 //
@@ -18,13 +18,9 @@
 #include <boost/interprocess/detail/config_begin.hpp>
 #include <boost/interprocess/detail/workaround.hpp>
 #include <boost/interprocess/creation_tags.hpp>
-#include <boost/interprocess/exceptions.hpp>
 #include <boost/interprocess/detail/posix_time_types_wrk.hpp>
-#include <boost/interprocess/shared_memory_object.hpp>
-#include <boost/interprocess/detail/managed_open_or_create_impl.hpp>
-#include <boost/interprocess/sync/interprocess_recursive_mutex.hpp>
-#include <boost/interprocess/sync/emulation/named_creation_functor.hpp>
 #include <boost/interprocess/permissions.hpp>
+#include <boost/interprocess/sync/shm/named_recursive_mutex.hpp>
 
 //!\file
 //!Describes a named named_recursive_mutex class for inter-process synchronization
@@ -101,11 +97,9 @@
    friend class ipcdetail::interprocess_tester;
    void dont_close_on_destruction();
 
- interprocess_recursive_mutex *mutex() const
- { return static_cast<interprocess_recursive_mutex*>(m_shmem.get_user_address()); }
+ typedef ipcdetail::shm_named_recursive_mutex impl_t;
+ impl_t m_mut;
 
- ipcdetail::managed_open_or_create_impl<shared_memory_object> m_shmem;
- typedef ipcdetail::named_creation_functor<interprocess_recursive_mutex> construct_func_t;
    /// @endcond
 };
 
@@ -115,48 +109,28 @@
 {}
 
 inline void named_recursive_mutex::dont_close_on_destruction()
-{ ipcdetail::interprocess_tester::dont_close_on_destruction(m_shmem); }
+{ ipcdetail::interprocess_tester::dont_close_on_destruction(m_mut); }
 
 inline named_recursive_mutex::named_recursive_mutex(create_only_t, const char *name, const permissions &perm)
- : m_shmem (create_only
- ,name
- ,sizeof(interprocess_recursive_mutex) +
- ipcdetail::managed_open_or_create_impl<shared_memory_object>::
- ManagedOpenOrCreateUserOffset
- ,read_write
- ,0
- ,construct_func_t(ipcdetail::DoCreate)
- ,perm)
+ : m_mut (create_only, name, perm)
 {}
 
 inline named_recursive_mutex::named_recursive_mutex(open_or_create_t, const char *name, const permissions &perm)
- : m_shmem (open_or_create
- ,name
- ,sizeof(interprocess_recursive_mutex) +
- ipcdetail::managed_open_or_create_impl<shared_memory_object>::
- ManagedOpenOrCreateUserOffset
- ,read_write
- ,0
- ,construct_func_t(ipcdetail::DoOpenOrCreate)
- ,perm)
+ : m_mut (open_or_create, name, perm)
 {}
 
 inline named_recursive_mutex::named_recursive_mutex(open_only_t, const char *name)
- : m_shmem (open_only
- ,name
- ,read_write
- ,0
- ,construct_func_t(ipcdetail::DoOpen))
+ : m_mut (open_only, name)
 {}
 
 inline void named_recursive_mutex::lock()
-{ this->mutex()->lock(); }
+{ m_mut.lock(); }
 
 inline void named_recursive_mutex::unlock()
-{ this->mutex()->unlock(); }
+{ m_mut.unlock(); }
 
 inline bool named_recursive_mutex::try_lock()
-{ return this->mutex()->try_lock(); }
+{ return m_mut.try_lock(); }
 
 inline bool named_recursive_mutex::timed_lock(const boost::posix_time::ptime &abs_time)
 {
@@ -164,11 +138,11 @@
       this->lock();
       return true;
    }
- return this->mutex()->timed_lock(abs_time);
+ return m_mut.timed_lock(abs_time);
 }
 
 inline bool named_recursive_mutex::remove(const char *name)
-{ return shared_memory_object::remove(name); }
+{ return impl_t::remove(name); }
 
 /// @endcond
 

Modified: branches/release/boost/interprocess/sync/named_upgradable_mutex.hpp
==============================================================================
--- branches/release/boost/interprocess/sync/named_upgradable_mutex.hpp (original)
+++ branches/release/boost/interprocess/sync/named_upgradable_mutex.hpp 2011-12-26 12:21:36 EST (Mon, 26 Dec 2011)
@@ -1,6 +1,6 @@
 //////////////////////////////////////////////////////////////////////////////
 //
-// (C) Copyright Ion Gaztanaga 2005-2009. Distributed under the Boost
+// (C) Copyright Ion Gaztanaga 2005-2011. 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)
 //
@@ -23,7 +23,7 @@
 #include <boost/interprocess/detail/managed_open_or_create_impl.hpp>
 #include <boost/interprocess/sync/interprocess_upgradable_mutex.hpp>
 #include <boost/interprocess/detail/posix_time_types_wrk.hpp>
-#include <boost/interprocess/sync/emulation/named_creation_functor.hpp>
+#include <boost/interprocess/sync/shm/named_creation_functor.hpp>
 #include <boost/interprocess/permissions.hpp>
 
 //!\file

Modified: branches/release/boost/interprocess/sync/null_mutex.hpp
==============================================================================
--- branches/release/boost/interprocess/sync/null_mutex.hpp (original)
+++ branches/release/boost/interprocess/sync/null_mutex.hpp 2011-12-26 12:21:36 EST (Mon, 26 Dec 2011)
@@ -1,6 +1,6 @@
 //////////////////////////////////////////////////////////////////////////////
 //
-// (C) Copyright Ion Gaztanaga 2005-2009. Distributed under the Boost
+// (C) Copyright Ion Gaztanaga 2005-2011. 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)
 //

Deleted: branches/release/boost/interprocess/sync/posix/interprocess_recursive_mutex.hpp
==============================================================================
--- branches/release/boost/interprocess/sync/posix/interprocess_recursive_mutex.hpp 2011-12-26 12:21:36 EST (Mon, 26 Dec 2011)
+++ (empty file)
@@ -1,122 +0,0 @@
-//////////////////////////////////////////////////////////////////////////////
-//
-// (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)
-//
-// See http://www.boost.org/libs/interprocess for documentation.
-//
-//////////////////////////////////////////////////////////////////////////////
-//
-// Parts of the pthread code come from Boost Threads code:
-//
-//////////////////////////////////////////////////////////////////////////////
-//
-// Copyright (C) 2001-2003
-// William E. Kempf
-//
-// Permission to use, copy, modify, distribute and sell this software
-// and its documentation for any purpose is hereby granted without fee,
-// provided that the above copyright notice appear in all copies and
-// that both that copyright notice and this permission notice appear
-// in supporting documentation. William E. Kempf makes no representations
-// about the suitability of this software for any purpose.
-// It is provided "as is" without express or implied warranty.
-//////////////////////////////////////////////////////////////////////////////
-
-#include <boost/interprocess/sync/posix/ptime_to_timespec.hpp>
-#include <boost/interprocess/detail/posix_time_types_wrk.hpp>
-#include <boost/interprocess/exceptions.hpp>
-#ifndef BOOST_INTERPROCESS_POSIX_TIMEOUTS
-# include <boost/interprocess/detail/os_thread_functions.hpp>
-#endif
-#include <boost/assert.hpp>
-
-namespace boost {
-
-namespace interprocess {
-
-inline interprocess_recursive_mutex::interprocess_recursive_mutex()
-{
- ipcdetail::mutexattr_wrapper mut_attr(true);
- ipcdetail::mutex_initializer mut(m_mut, mut_attr);
- mut.release();
-}
-
-inline interprocess_recursive_mutex::~interprocess_recursive_mutex()
-{
- int res = pthread_mutex_destroy(&m_mut);
- BOOST_ASSERT(res == 0);(void)res;
-}
-
-inline void interprocess_recursive_mutex::lock()
-{
-#ifdef BOOST_INTERPROCESS_ENABLE_TIMEOUT_WHEN_LOCKING
- boost::posix_time::ptime wait_time
- = boost::posix_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
- if (pthread_mutex_lock(&m_mut) != 0)
- throw lock_exception();
-#endif
-}
-
-inline bool interprocess_recursive_mutex::try_lock()
-{
- int res = pthread_mutex_trylock(&m_mut);
- if (!(res == 0 || res == EBUSY))
- throw lock_exception();
- return res == 0;
-}
-
-inline bool interprocess_recursive_mutex::timed_lock(const boost::posix_time::ptime &abs_time)
-{
- if(abs_time == boost::posix_time::pos_infin){
- this->lock();
- return true;
- }
- #ifdef BOOST_INTERPROCESS_POSIX_TIMEOUTS
-
- timespec ts = ipcdetail::ptime_to_timespec(abs_time);
- int res = pthread_mutex_timedlock(&m_mut, &ts);
- if (res != 0 && res != ETIMEDOUT)
- throw lock_exception();
- return res == 0;
-
- #else //BOOST_INTERPROCESS_POSIX_TIMEOUTS
-
- //Obtain current count and target time
- boost::posix_time::ptime now = microsec_clock::universal_time();
-
- if(now >= abs_time) return false;
-
- do{
- if(this->try_lock()){
- break;
- }
- now = microsec_clock::universal_time();
-
- if(now >= abs_time){
- return false;
- }
- // relinquish current time slice
- ipcdetail::thread_yield();
- }while (true);
- return true;
-
- #endif //BOOST_INTERPROCESS_POSIX_TIMEOUTS
-}
-
-inline void interprocess_recursive_mutex::unlock()
-{
- int res = 0;
- res = pthread_mutex_unlock(&m_mut);
- BOOST_ASSERT(res == 0);
-}
-
-} //namespace interprocess {
-} //namespace boost {

Modified: branches/release/boost/interprocess/sync/sharable_lock.hpp
==============================================================================
--- branches/release/boost/interprocess/sync/sharable_lock.hpp (original)
+++ branches/release/boost/interprocess/sync/sharable_lock.hpp 2011-12-26 12:21:36 EST (Mon, 26 Dec 2011)
@@ -1,6 +1,6 @@
 //////////////////////////////////////////////////////////////////////////////
 //
-// (C) Copyright Ion Gaztanaga 2005-2009. Distributed under the Boost
+// (C) Copyright Ion Gaztanaga 2005-2011. 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,7 +27,7 @@
 #include <boost/interprocess/exceptions.hpp>
 #include <boost/interprocess/detail/mpl.hpp>
 #include <boost/interprocess/detail/type_traits.hpp>
-#include <boost/interprocess/detail/move.hpp>
+#include <boost/move/move.hpp>
 #include <boost/interprocess/detail/posix_time_types_wrk.hpp>
 
 //!\file
@@ -122,7 +122,7 @@
    //! sharable_lock with no blocking. If the upgr sharable_lock does not own the mutex, then
    //! neither will this sharable_lock. Only a moved sharable_lock's will match this
    //! signature. An non-moved sharable_lock can be moved with the expression:
- //! "boost::interprocess::move(lock);". This constructor does not alter the state of the mutex,
+ //! "boost::move(lock);". This constructor does not alter the state of the mutex,
    //! only potentially who owns it.
    sharable_lock(BOOST_RV_REF(sharable_lock<mutex_type>) upgr)
       : mp_mutex(0), m_locked(upgr.owns())
@@ -136,7 +136,7 @@
    //!Notes: If upgr is locked, this constructor will lock this sharable_lock while
    //! unlocking upgr. Only a moved sharable_lock's will match this
    //! signature. An non-moved upgradable_lock can be moved with the expression:
- //! "boost::interprocess::move(lock);".*/
+ //! "boost::move(lock);".*/
    template<class T>
    sharable_lock(BOOST_RV_REF(upgradable_lock<T>) upgr
       , typename ipcdetail::enable_if< ipcdetail::is_same<T, SharableMutex> >::type * = 0)
@@ -159,7 +159,7 @@
    //! to a sharable-ownership of this sharable_lock.
    //! Only a moved scoped_lock's will match this
    //! signature. An non-moved scoped_lock can be moved with the expression:
- //! "boost::interprocess::move(lock);".
+ //! "boost::move(lock);".
    template<class T>
    sharable_lock(BOOST_RV_REF(scoped_lock<T>) scop
                , typename ipcdetail::enable_if< ipcdetail::is_same<T, SharableMutex> >::type * = 0)

Modified: branches/release/boost/interprocess/windows_shared_memory.hpp
==============================================================================
--- branches/release/boost/interprocess/windows_shared_memory.hpp (original)
+++ branches/release/boost/interprocess/windows_shared_memory.hpp 2011-12-26 12:21:36 EST (Mon, 26 Dec 2011)
@@ -1,6 +1,6 @@
 //////////////////////////////////////////////////////////////////////////////
 //
-// (C) Copyright Ion Gaztanaga 2005-2009. Distributed under the Boost
+// (C) Copyright Ion Gaztanaga 2005-2011. 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)
 //
@@ -89,7 +89,7 @@
    //!Does not throw
    windows_shared_memory &operator=(BOOST_RV_REF(windows_shared_memory) moved)
    {
- windows_shared_memory tmp(boost::interprocess::move(moved));
+ windows_shared_memory tmp(boost::move(moved));
       this->swap(tmp);
       return *this;
    }

Modified: branches/release/boost/interprocess/xsi_key.hpp
==============================================================================
--- branches/release/boost/interprocess/xsi_key.hpp (original)
+++ branches/release/boost/interprocess/xsi_key.hpp 2011-12-26 12:21:36 EST (Mon, 26 Dec 2011)
@@ -22,7 +22,7 @@
 #include <boost/interprocess/creation_tags.hpp>
 #include <boost/interprocess/exceptions.hpp>
 #include <boost/interprocess/detail/utilities.hpp>
-#include <boost/interprocess/detail/move.hpp>
+#include <boost/move/move.hpp>
 #include <boost/interprocess/detail/os_file_functions.hpp>
 #include <boost/interprocess/interprocess_fwd.hpp>
 #include <boost/interprocess/exceptions.hpp>

Modified: branches/release/boost/interprocess/xsi_shared_memory.hpp
==============================================================================
--- branches/release/boost/interprocess/xsi_shared_memory.hpp (original)
+++ branches/release/boost/interprocess/xsi_shared_memory.hpp 2011-12-26 12:21:36 EST (Mon, 26 Dec 2011)
@@ -22,7 +22,7 @@
 #include <boost/interprocess/creation_tags.hpp>
 #include <boost/interprocess/exceptions.hpp>
 #include <boost/interprocess/detail/utilities.hpp>
-#include <boost/interprocess/detail/move.hpp>
+#include <boost/move/move.hpp>
 #include <boost/interprocess/detail/os_file_functions.hpp>
 #include <boost/interprocess/interprocess_fwd.hpp>
 #include <boost/interprocess/exceptions.hpp>
@@ -90,7 +90,7 @@
    //!Does not throw
    xsi_shared_memory &operator=(BOOST_RV_REF(xsi_shared_memory) moved)
    {
- xsi_shared_memory tmp(boost::interprocess::move(moved));
+ xsi_shared_memory tmp(boost::move(moved));
       this->swap(tmp);
       return *this;
    }


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk