Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r74084 - in trunk/libs/interprocess: . doc example proj proj/vc7ide test
From: igaztanaga_at_[hidden]
Date: 2011-08-27 04:31:29


Author: igaztanaga
Date: 2011-08-27 04:31:23 EDT (Sat, 27 Aug 2011)
New Revision: 74084
URL: http://svn.boost.org/trac/boost/changeset/74084

Log:
* Erased containers now that Boost.Container is accepted
* Changed "detail" namespace to "ipcdetail" due to compilation errors in MSVC compilers and wrong ambiguous resolutions.
* Added locking timeout macro to avoid deadlocks
Added:
   trunk/libs/interprocess/Interprocess_sync_windows_emulation.txt (contents, props changed)
   trunk/libs/interprocess/proj/vc7ide/mutex_timeout_test.vcproj (contents, props changed)
   trunk/libs/interprocess/test/mutex_timeout_test.cpp (contents, props changed)
Text files modified:
   trunk/libs/interprocess/doc/interprocess.qbk | 4
   trunk/libs/interprocess/example/Jamfile.v2 | 2
   trunk/libs/interprocess/example/doc_file_mapping.cpp | 2
   trunk/libs/interprocess/example/doc_managed_copy_on_write.cpp | 4
   trunk/libs/interprocess/example/doc_managed_mapped_file.cpp | 2
   trunk/libs/interprocess/example/doc_shared_ptr.cpp | 2
   trunk/libs/interprocess/example/doc_unique_ptr.cpp | 2
   trunk/libs/interprocess/proj/to-do.txt | 2
   trunk/libs/interprocess/proj/vc7ide/Interprocess.sln | 8 ++
   trunk/libs/interprocess/proj/vc7ide/interprocesslib.vcproj | 119 ----------------------------------------
   trunk/libs/interprocess/test/adaptive_node_pool_test.cpp | 2
   trunk/libs/interprocess/test/adaptive_pool_test.cpp | 6 +-
   trunk/libs/interprocess/test/allocator_v1.hpp | 12 ++--
   trunk/libs/interprocess/test/cached_adaptive_pool_test.cpp | 6 +-
   trunk/libs/interprocess/test/cached_node_allocator_test.cpp | 6 +-
   trunk/libs/interprocess/test/deque_test.cpp | 6 +-
   trunk/libs/interprocess/test/dummy_test_allocator.hpp | 4
   trunk/libs/interprocess/test/emplace_test.hpp | 34 +++++-----
   trunk/libs/interprocess/test/expand_bwd_test_allocator.hpp | 10 +-
   trunk/libs/interprocess/test/file_lock_test.cpp | 2
   trunk/libs/interprocess/test/file_mapping_test.cpp | 2
   trunk/libs/interprocess/test/get_process_id_name.hpp | 2
   trunk/libs/interprocess/test/heap_allocator_v1.hpp | 12 ++--
   trunk/libs/interprocess/test/intermodule_singleton_test.cpp | 4
   trunk/libs/interprocess/test/intersegment_ptr_test.cpp | 8 +-
   trunk/libs/interprocess/test/managed_mapped_file_test.cpp | 2
   trunk/libs/interprocess/test/managed_xsi_shared_memory_test.cpp | 4
   trunk/libs/interprocess/test/mapped_file_test.cpp | 14 ++--
   trunk/libs/interprocess/test/memory_algorithm_test_template.hpp | 4
   trunk/libs/interprocess/test/mutex_test_template.hpp | 65 +++++++++++++++++++++
   trunk/libs/interprocess/test/named_condition_test.cpp | 2
   trunk/libs/interprocess/test/named_construct_test.cpp | 12 ++--
   trunk/libs/interprocess/test/named_mutex_test.cpp | 4
   trunk/libs/interprocess/test/named_recursive_mutex_test.cpp | 4
   trunk/libs/interprocess/test/named_semaphore_test.cpp | 2
   trunk/libs/interprocess/test/named_upgradable_mutex_test.cpp | 4
   trunk/libs/interprocess/test/node_allocator_test.cpp | 6 +-
   trunk/libs/interprocess/test/node_pool_test.cpp | 2
   trunk/libs/interprocess/test/offset_ptr_test.cpp | 8 +-
   trunk/libs/interprocess/test/private_adaptive_pool_test.cpp | 6 +-
   trunk/libs/interprocess/test/private_node_allocator_test.cpp | 6 +-
   trunk/libs/interprocess/test/robust_emulation_test.cpp | 2
   trunk/libs/interprocess/test/robust_mutex_test.hpp | 4
   trunk/libs/interprocess/test/robust_recursive_emulation_test.cpp | 2
   trunk/libs/interprocess/test/shared_memory_mapping_test.cpp | 45 +++++++++++---
   trunk/libs/interprocess/test/shared_memory_test.cpp | 2
   trunk/libs/interprocess/test/shared_ptr_test.cpp | 4
   trunk/libs/interprocess/test/tree_test.cpp | 2
   trunk/libs/interprocess/test/util.hpp | 9 +-
   trunk/libs/interprocess/test/vector_test.hpp | 8 +-
   trunk/libs/interprocess/test/windows_shared_memory_test.cpp | 2
   trunk/libs/interprocess/test/xsi_shared_memory_mapping_test.cpp | 4
   52 files changed, 236 insertions(+), 256 deletions(-)

Added: trunk/libs/interprocess/Interprocess_sync_windows_emulation.txt
==============================================================================
--- (empty file)
+++ trunk/libs/interprocess/Interprocess_sync_windows_emulation.txt 2011-08-27 04:31:23 EDT (Sat, 27 Aug 2011)
@@ -0,0 +1,207 @@
+---------------
+---------------
+named_semaphore
+---------------
+---------------
+
+- Use a file for file lifetime semantics (create, open, unlink...)
+- Create on demand (open or create) a windows named semaphore with all access (permissions are on the file).
+- Use file id with a "prefix bips." to construct the mutex "Global\prefix bips.XXXXXXXXXXXXXXXXXXX"
+- Add getvalue as implemented by cygwin
+- Write sem status to file at file close. Use native file locking to serialize.
+- See cygwin-1.7.5-1\winsup\cygwin\posix_ipc.cc and thread.cc
+
+
+
+
+-----------
+-----------
+named_mutex
+-----------
+-----------
+
+- Don't serialize
+
+---------------
+---------------
+named_condition
+---------------
+---------------
+
+
+---------------
+---------------
+Process shared resources. Use lock reduced versions?
+---------------
+---------------
+
+what about fast_semaphore (http://www.tech-archive.net/Archive/Development/microsoft.public.win32.programmer.kernel/2005-03/0041.html):
+
+class fast_semaphore
+{
+
+public:
+
+ fast_semaphore( LONG init )
+ : m_state( init ),
+ m_waitset( CreateSemaphore( 0, 0, LONG_MAX, 0 ) )
+ { if ( ! m_waitset ) { throw; } }
+
+ ~fast_semaphore()
+ { if ( ! CloseHandle( m_waitset ) ) { abort(); } }
+
+public:
+
+ void inc()
+ {
+ if ( InterlockedIncrement( &m_state ) < 1 )
+ {
+ if ( ! ReleaseSemaphore( m_waitset, 1, 0 ) )
+ {
+ throw;
+ }
+ }
+ }
+
+ void dec()
+ {
+ if ( InterlockedDecrement( &m_state ) < 0 )
+ {
+ if ( WaitForSingleObject( m_waitset, INFINITE ) !=
+WAIT_OBJECT_0 )
+ {
+ throw;
+ }
+ }
+ }
+
+private:
+
+ volatile LONG m_state;
+ HANDLE m_waitset;
+
+};
+
+class mutex_from_semaphore
+{
+
+public:
+
+ mutex_from_semaphore() : m_waitset( 1 ) {}
+
+public:
+
+ void enter() { m_waitset.dec(); }
+ void leave() { m_waitset.inc(); }
+
+private:
+
+ fast_semaphore m_waitset;
+
+};
+
+Or see Java implemenation (http://www.google.com/codesearch/p?hl=es#5qy3uURTOpU/trunk/JobRunner/src/org/ivoa/util/concurrent/FastSemaphore.java&q=%22fast%20semaphore%22&sa=N&cd=1&ct=rc&l=10)
+
+
+For mutex, usefast mutex (see fast_mutex.h in cygwin):
+
+
+class fast_mutex
+{
+public:
+ fast_mutex () :
+ lock_counter (0), win32_obj_id (0)
+ {
+ }
+
+ ~fast_mutex ()
+ {
+ if(win32_obj_id)
+ CloseHandle (win32_obj_id);
+ }
+
+ bool init ()
+ {
+ lock_counter = 0;
+ win32_obj_id = ::CreateEvent (&sec_none_nih, false, false, NULL);
+ if (!win32_obj_id)
+ {
+ debug_printf ("CreateEvent failed. %E");
+ return false;
+ }
+ return true;
+ }
+
+ void lock ()
+ {
+ if (InterlockedIncrement ((long *) &lock_counter) != 1)
+ cancelable_wait (win32_obj_id, INFINITE, cw_no_cancel, cw_sig_resume);
+ }
+
+ void unlock ()
+ {
+ if (InterlockedDecrement ((long *) &lock_counter))
+ ::SetEvent (win32_obj_id);
+ }
+
+private:
+ unsigned long lock_counter;
+ HANDLE win32_obj_id;
+};
+
+
+Or this one (http://www.tech-archive.net/Archive/Development/microsoft.public.win32.programmer.kernel/2005-03/0067.html):
+
+
+class fast_mutex
+{
+
+public:
+
+ fast_mutex
+ : m_state( 0 ),
+ m_waitset( CreateEvent( 0, FALSE, FALSE 0 ) )
+ { if ( ! m_waitset ) { throw; } }
+
+ ~fast_mutex
+ { if ( ! CloseHandle( m_waitset ) ) { abort(); } }
+
+public:
+
+ void enter
+ {
+ if ( InterlockedExchange( &m_state, 1 ) )
+ {
+ _asm pause; /* masm */
+
+ while ( InterlockedExchange( &m_state, 2 ) )
+ {
+ if ( WaitForSingleObject
+ ( m_waitset,
+ INFINITE ) !=
+ WAIT_OBJECT_0 )
+ {
+ throw;
+ }
+ }
+ }
+ }
+
+ void leave()
+ {
+ if ( InterlockedExchange( &m_state, 0 ) == 2 )
+ {
+ if ( ! SetEvent( m_waitset ) )
+ {
+ throw;
+ }
+ }
+ }
+
+private:
+
+ volatile LONG m_state;
+ HANDLE m_waitset;
+
+};
+

Modified: trunk/libs/interprocess/doc/interprocess.qbk
==============================================================================
--- trunk/libs/interprocess/doc/interprocess.qbk (original)
+++ trunk/libs/interprocess/doc/interprocess.qbk 2011-08-27 04:31:23 EDT (Sat, 27 Aug 2011)
@@ -5944,7 +5944,7 @@
 in [*Boost.Interprocess] all managed memory segments derive from a common class that
 implements memory-independent (shared memory, memory mapped files) functions:
 [@../../boost/interprocess/detail/managed_memory_impl.hpp
-boost::interprocess::detail::basic_managed_memory_impl]
+boost::interprocess::ipcdetail::basic_managed_memory_impl]
 
 Deriving from this class, [*Boost.Interprocess] implements several managed memory
 classes, for different memory backends:
@@ -6315,7 +6315,7 @@
 * The [*allocate()] function must return 0 if there is no more available memory.
    The memory returned by [*my_algorithm]
    must be aligned to the most restrictive memory alignment of the system, for example,
- to the value returned by *detail::alignment_of<boost::detail::max_align>::value*.
+ to the value returned by *ipcdetail::alignment_of<boost::detail::max_align>::value*.
    This function should be executed with the synchronization capabilities offered
    by `typename mutex_family::mutex_type` interprocess_mutex. That means, that if we define
    `typedef mutex_family mutex_family;` then this function should offer

Modified: trunk/libs/interprocess/example/Jamfile.v2
==============================================================================
--- trunk/libs/interprocess/example/Jamfile.v2 (original)
+++ trunk/libs/interprocess/example/Jamfile.v2 2011-08-27 04:31:23 EDT (Sat, 27 Aug 2011)
@@ -48,4 +48,4 @@
    return $(all_rules) ;
 }
 
-test-suite interprocess_example : [ test_all r ] : <threading>multi ;
+test-suite interprocess_example : [ test_all r ] : <threading>multi ;
\ No newline at end of file

Modified: trunk/libs/interprocess/example/doc_file_mapping.cpp
==============================================================================
--- trunk/libs/interprocess/example/doc_file_mapping.cpp (original)
+++ trunk/libs/interprocess/example/doc_file_mapping.cpp 2011-08-27 04:31:23 EDT (Sat, 27 Aug 2011)
@@ -29,7 +29,7 @@
    //Define file names
    //<-
    #if 1
- std::string file_name(boost::interprocess::detail::get_temporary_path());
+ std::string file_name(boost::interprocess::ipcdetail::get_temporary_path());
    file_name += "/"; file_name += test::get_process_id_name();
    const char *FileName = file_name.c_str();
    #else

Modified: trunk/libs/interprocess/example/doc_managed_copy_on_write.cpp
==============================================================================
--- trunk/libs/interprocess/example/doc_managed_copy_on_write.cpp (original)
+++ trunk/libs/interprocess/example/doc_managed_copy_on_write.cpp 2011-08-27 04:31:23 EDT (Sat, 27 Aug 2011)
@@ -25,10 +25,10 @@
    //Define file names
    //<-
    #if 1
- std::string managed_file(boost::interprocess::detail::get_temporary_path());
+ std::string managed_file(boost::interprocess::ipcdetail::get_temporary_path());
    managed_file += "/"; managed_file += test::get_process_id_name();
    const char *ManagedFile = managed_file.c_str();
- std::string managed_file2(boost::interprocess::detail::get_temporary_path());
+ std::string managed_file2(boost::interprocess::ipcdetail::get_temporary_path());
    managed_file2 += "/"; managed_file2 += test::get_process_id_name(); managed_file2 += "_2";
    const char *ManagedFile2 = managed_file2.c_str();
    #else

Modified: trunk/libs/interprocess/example/doc_managed_mapped_file.cpp
==============================================================================
--- trunk/libs/interprocess/example/doc_managed_mapped_file.cpp (original)
+++ trunk/libs/interprocess/example/doc_managed_mapped_file.cpp 2011-08-27 04:31:23 EDT (Sat, 27 Aug 2011)
@@ -29,7 +29,7 @@
    //Define file names
    //<-
    #if 1
- std::string file(boost::interprocess::detail::get_temporary_path());
+ std::string file(boost::interprocess::ipcdetail::get_temporary_path());
    file += "/"; file += test::get_process_id_name();
    const char *FileName = file.c_str();
    #else

Modified: trunk/libs/interprocess/example/doc_shared_ptr.cpp
==============================================================================
--- trunk/libs/interprocess/example/doc_shared_ptr.cpp (original)
+++ trunk/libs/interprocess/example/doc_shared_ptr.cpp 2011-08-27 04:31:23 EDT (Sat, 27 Aug 2011)
@@ -51,7 +51,7 @@
    //Define file names
    //<-
    #if 1
- std::string mapped_file(boost::interprocess::detail::get_temporary_path());
+ std::string mapped_file(boost::interprocess::ipcdetail::get_temporary_path());
    mapped_file += "/"; mapped_file += test::get_process_id_name();
    const char *MappedFile = mapped_file.c_str();
    #else

Modified: trunk/libs/interprocess/example/doc_unique_ptr.cpp
==============================================================================
--- trunk/libs/interprocess/example/doc_unique_ptr.cpp (original)
+++ trunk/libs/interprocess/example/doc_unique_ptr.cpp 2011-08-27 04:31:23 EDT (Sat, 27 Aug 2011)
@@ -53,7 +53,7 @@
    //Define file names
    //<-
    #if 1
- std::string mapped_file(boost::interprocess::detail::get_temporary_path());
+ std::string mapped_file(boost::interprocess::ipcdetail::get_temporary_path());
    mapped_file += "/"; mapped_file += test::get_process_id_name();
    const char *MappedFile = mapped_file.c_str();
    #else

Modified: trunk/libs/interprocess/proj/to-do.txt
==============================================================================
--- trunk/libs/interprocess/proj/to-do.txt (original)
+++ trunk/libs/interprocess/proj/to-do.txt 2011-08-27 04:31:23 EDT (Sat, 27 Aug 2011)
@@ -238,4 +238,4 @@
    unlink(lockfilename)
 }
 
-detail::intermodule_singleton<MyRobustMutexLockFile>::get();
+ipcdetail::intermodule_singleton<MyRobustMutexLockFile>::get();

Modified: trunk/libs/interprocess/proj/vc7ide/Interprocess.sln
==============================================================================
--- trunk/libs/interprocess/proj/vc7ide/Interprocess.sln (original)
+++ trunk/libs/interprocess/proj/vc7ide/Interprocess.sln 2011-08-27 04:31:23 EDT (Sat, 27 Aug 2011)
@@ -399,6 +399,10 @@
         ProjectSection(ProjectDependencies) = postProject
         EndProjectSection
 EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mutex_timeout_test", "mutex_timeout_test.vcproj", "{83581CCE-487E-3292-A4E7-BA07926D3A27}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
 Global
         GlobalSection(SolutionConfiguration) = preSolution
                 Debug = Debug
@@ -807,6 +811,10 @@
                 {58CA17C5-A74F-9602-48FE-B06310DA7FA6}.Debug.Build.0 = Debug|Win32
                 {58CA17C5-A74F-9602-48FE-B06310DA7FA6}.Release.ActiveCfg = Release|Win32
                 {58CA17C5-A74F-9602-48FE-B06310DA7FA6}.Release.Build.0 = Release|Win32
+ {83581CCE-487E-3292-A4E7-BA07926D3A27}.Debug.ActiveCfg = Debug|Win32
+ {83581CCE-487E-3292-A4E7-BA07926D3A27}.Debug.Build.0 = Debug|Win32
+ {83581CCE-487E-3292-A4E7-BA07926D3A27}.Release.ActiveCfg = Release|Win32
+ {83581CCE-487E-3292-A4E7-BA07926D3A27}.Release.Build.0 = Release|Win32
         EndGlobalSection
         GlobalSection(ExtensibilityGlobals) = postSolution
         EndGlobalSection

Modified: trunk/libs/interprocess/proj/vc7ide/interprocesslib.vcproj
==============================================================================
--- trunk/libs/interprocess/proj/vc7ide/interprocesslib.vcproj (original)
+++ trunk/libs/interprocess/proj/vc7ide/interprocesslib.vcproj 2011-08-27 04:31:23 EDT (Sat, 27 Aug 2011)
@@ -140,125 +140,6 @@
                         <File
                                 RelativePath="..\..\..\..\boost\interprocess\containers\version_type.hpp">
                         </File>
- <Filter
- Name="container"
- Filter="">
- <File
- RelativePath="..\..\..\..\boost\interprocess\containers\container\container_fwd.hpp">
- </File>
- <File
- RelativePath="..\..\..\..\boost\interprocess\containers\container\deque.hpp">
- </File>
- <File
- RelativePath="..\..\..\..\boost\interprocess\containers\container\flat_map.hpp">
- </File>
- <File
- RelativePath="..\..\..\..\boost\interprocess\containers\container\flat_set.hpp">
- </File>
- <File
- RelativePath="..\..\..\..\boost\interprocess\containers\container\list.hpp">
- </File>
- <File
- RelativePath="..\..\..\..\boost\interprocess\containers\container\map.hpp">
- </File>
- <File
- RelativePath="..\..\..\..\boost\interprocess\containers\container\set.hpp">
- </File>
- <File
- RelativePath="..\..\..\..\boost\interprocess\containers\container\slist.hpp">
- </File>
- <File
- RelativePath="..\..\..\..\boost\interprocess\containers\container\stable_vector.hpp">
- </File>
- <File
- RelativePath="..\..\..\..\boost\interprocess\containers\container\string.hpp">
- </File>
- <File
- RelativePath="..\..\..\..\boost\interprocess\containers\container\vector.hpp">
- </File>
- <Filter
- Name="detail"
- Filter="">
- <File
- RelativePath="..\..\..\..\boost\interprocess\containers\container\detail\adaptive_node_pool_impl.hpp">
- </File>
- <File
- RelativePath="..\..\..\..\boost\interprocess\containers\container\detail\advanced_insert_int.hpp">
- </File>
- <File
- RelativePath="..\..\..\..\boost\interprocess\containers\container\detail\algorithms.hpp">
- </File>
- <File
- RelativePath="..\..\..\..\boost\interprocess\containers\container\detail\allocation_type.hpp">
- </File>
- <File
- RelativePath="..\..\..\..\boost\interprocess\containers\container\detail\config_begin.hpp">
- </File>
- <File
- RelativePath="..\..\..\..\boost\interprocess\containers\container\detail\config_end.hpp">
- </File>
- <File
- RelativePath="..\..\..\..\boost\interprocess\containers\container\detail\destroyers.hpp">
- </File>
- <File
- RelativePath="..\..\..\..\boost\interprocess\containers\container\detail\flat_tree.hpp">
- </File>
- <File
- RelativePath="..\..\..\..\boost\interprocess\containers\container\detail\iterators.hpp">
- </File>
- <File
- RelativePath="..\..\..\..\boost\interprocess\containers\container\detail\math_functions.hpp">
- </File>
- <File
- RelativePath="..\..\..\..\boost\interprocess\containers\container\detail\mpl.hpp">
- </File>
- <File
- RelativePath="..\..\..\..\boost\interprocess\containers\container\detail\multiallocation_chain.hpp">
- </File>
- <File
- RelativePath="..\..\..\..\boost\interprocess\containers\container\detail\node_alloc_holder.hpp">
- </File>
- <File
- RelativePath="..\..\..\..\boost\interprocess\containers\container\detail\node_pool_impl.hpp">
- </File>
- <File
- RelativePath="..\..\..\..\boost\interprocess\containers\container\detail\pair.hpp">
- </File>
- <File
- RelativePath="..\..\..\..\boost\interprocess\containers\container\detail\pool_common.hpp">
- </File>
- <File
- RelativePath="..\..\..\..\boost\interprocess\containers\container\detail\preprocessor.hpp">
- </File>
- <File
- RelativePath="..\..\..\..\boost\interprocess\containers\container\detail\stored_ref.hpp">
- </File>
- <File
- RelativePath="..\..\..\..\boost\interprocess\containers\container\detail\transform_iterator.hpp">
- </File>
- <File
- RelativePath="..\..\..\..\boost\interprocess\containers\container\detail\tree.hpp">
- </File>
- <File
- RelativePath="..\..\..\..\boost\interprocess\containers\container\detail\type_traits.hpp">
- </File>
- <File
- RelativePath="..\..\..\..\boost\interprocess\containers\container\detail\utilities.hpp">
- </File>
- <File
- RelativePath="..\..\..\..\boost\interprocess\containers\container\detail\value_init.hpp">
- </File>
- <File
- RelativePath="..\..\..\..\boost\interprocess\containers\container\detail\variadic_templates_tools.hpp">
- </File>
- <File
- RelativePath="..\..\..\..\boost\interprocess\containers\container\detail\version_type.hpp">
- </File>
- <File
- RelativePath="..\..\..\..\boost\interprocess\containers\container\detail\workaround.hpp">
- </File>
- </Filter>
- </Filter>
                 </Filter>
                 <Filter
                         Name="Allocators"

Added: trunk/libs/interprocess/proj/vc7ide/mutex_timeout_test.vcproj
==============================================================================
--- (empty file)
+++ trunk/libs/interprocess/proj/vc7ide/mutex_timeout_test.vcproj 2011-08-27 04:31:23 EDT (Sat, 27 Aug 2011)
@@ -0,0 +1,138 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="7.10"
+ Name="mutex_timeout_test"
+ ProjectGUID="{83581CCE-487E-3292-A4E7-BA07926D3A27}"
+ Keyword="Win32Proj">
+ <Platforms>
+ <Platform
+ Name="Win32"/>
+ </Platforms>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="../../Bin/Win32/Debug"
+ IntermediateDirectory="Debug/mutex_timeout_test"
+ ConfigurationType="1"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="../../../.."
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;BOOST_DATE_TIME_NO_LIB"
+ MinimalRebuild="TRUE"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ TreatWChar_tAsBuiltInType="TRUE"
+ ForceConformanceInForLoopScope="FALSE"
+ UsePrecompiledHeader="0"
+ WarningLevel="4"
+ Detect64BitPortabilityProblems="TRUE"
+ DebugInformationFormat="3"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="winmm.lib"
+ OutputFile="$(OutDir)/mutex_timeout_test_d.exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="../../../../stage/lib"
+ GenerateDebugInformation="TRUE"
+ ProgramDatabaseFile="$(OutDir)/mutex_timeout_test.pdb"
+ SubSystem="1"
+ TargetMachine="1"
+ FixedBaseAddress="1"/>
+ <Tool
+ Name="VCMIDLTool"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="../../Bin/Win32/Release"
+ IntermediateDirectory="Release/mutex_timeout_test"
+ ConfigurationType="1"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="../../../.."
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;BOOST_DATE_TIME_NO_LIB"
+ RuntimeLibrary="2"
+ TreatWChar_tAsBuiltInType="TRUE"
+ ForceConformanceInForLoopScope="FALSE"
+ UsePrecompiledHeader="0"
+ WarningLevel="4"
+ Detect64BitPortabilityProblems="TRUE"
+ DebugInformationFormat="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="winmm.lib"
+ OutputFile="$(OutDir)/mutex_timeout_test.exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="../../../../stage/lib"
+ GenerateDebugInformation="TRUE"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="1"/>
+ <Tool
+ Name="VCMIDLTool"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{A07926F1-7436-A5C7-6A60-52A2D72FFA32}">
+ <File
+ RelativePath="..\..\test\mutex_timeout_test.cpp">
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{38095399-D89B-88EB-4b04-BE65522EBFFB}">
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>

Modified: trunk/libs/interprocess/test/adaptive_node_pool_test.cpp
==============================================================================
--- trunk/libs/interprocess/test/adaptive_node_pool_test.cpp (original)
+++ trunk/libs/interprocess/test/adaptive_node_pool_test.cpp 2011-08-27 04:31:23 EDT (Sat, 27 Aug 2011)
@@ -18,7 +18,7 @@
 
 int main ()
 {
- typedef detail::private_adaptive_node_pool
+ typedef ipcdetail::private_adaptive_node_pool
       <segment_manager_t, 4, 64, 64, 5> node_pool_t;
 
    if(!test::test_all_node_pool<node_pool_t>())

Modified: trunk/libs/interprocess/test/adaptive_pool_test.cpp
==============================================================================
--- trunk/libs/interprocess/test/adaptive_pool_test.cpp (original)
+++ trunk/libs/interprocess/test/adaptive_pool_test.cpp 2011-08-27 04:31:23 EDT (Sat, 27 Aug 2011)
@@ -26,14 +26,14 @@
 typedef adaptive_pool
    <int, managed_shared_memory::segment_manager> shmem_node_allocator_t;
 
-typedef detail::adaptive_pool_v1
+typedef ipcdetail::adaptive_pool_v1
    <int, managed_shared_memory::segment_manager> shmem_node_allocator_v1_t;
 
 //Explicit instantiations to catch compilation errors
 template class adaptive_pool<int, managed_shared_memory::segment_manager>;
-template class detail::adaptive_pool_v1<int, managed_shared_memory::segment_manager>;
+template class ipcdetail::adaptive_pool_v1<int, managed_shared_memory::segment_manager>;
 template class adaptive_pool<void, managed_shared_memory::segment_manager>;
-template class detail::adaptive_pool_v1<void, managed_shared_memory::segment_manager>;
+template class ipcdetail::adaptive_pool_v1<void, managed_shared_memory::segment_manager>;
 
 //Alias list types
 typedef list<int, shmem_node_allocator_t> MyShmList;

Modified: trunk/libs/interprocess/test/allocator_v1.hpp
==============================================================================
--- trunk/libs/interprocess/test/allocator_v1.hpp (original)
+++ trunk/libs/interprocess/test/allocator_v1.hpp 2011-08-27 04:31:23 EDT (Sat, 27 Aug 2011)
@@ -70,9 +70,9 @@
       <cvoid_ptr, T>::type pointer;
    typedef typename boost::
       pointer_to_other<pointer, const T>::type const_pointer;
- typedef typename detail::add_reference
+ typedef typename ipcdetail::add_reference
                      <value_type>::type reference;
- typedef typename detail::add_reference
+ typedef typename ipcdetail::add_reference
                      <const value_type>::type const_reference;
    typedef typename segment_manager::size_type size_type;
    typedef typename segment_manager::difference_type difference_type;
@@ -86,7 +86,7 @@
 
    //!Returns the segment manager. Never throws
    segment_manager* get_segment_manager()const
- { return detail::get_pointer(mp_mngr); }
+ { return ipcdetail::get_pointer(mp_mngr); }
 /*
    //!Returns address of mutable object. Never throws
    pointer address(reference value) const
@@ -116,12 +116,12 @@
 
    //!Deallocates memory previously allocated. Never throws
    void deallocate(const pointer &ptr, size_type)
- { mp_mngr->deallocate((void*)detail::get_pointer(ptr)); }
+ { mp_mngr->deallocate((void*)ipcdetail::get_pointer(ptr)); }
 
    //!Construct object, calling constructor.
    //!Throws if T(const T&) throws
    void construct(const pointer &ptr, const_reference value)
- { new((void*)detail::get_pointer(ptr)) value_type(value); }
+ { new((void*)ipcdetail::get_pointer(ptr)) value_type(value); }
 
    //!Destroys object. Throws if object's destructor throws
    void destroy(const pointer &ptr)
@@ -134,7 +134,7 @@
    //!Swap segment manager. Does not throw. If each allocator_v1 is placed in
    //!different memory segments, the result is undefined.
    friend void swap(self_t &alloc1, self_t &alloc2)
- { detail::do_swap(alloc1.mp_mngr, alloc2.mp_mngr); }
+ { ipcdetail::do_swap(alloc1.mp_mngr, alloc2.mp_mngr); }
 };
 
 //!Equality test for same type of allocator_v1

Modified: trunk/libs/interprocess/test/cached_adaptive_pool_test.cpp
==============================================================================
--- trunk/libs/interprocess/test/cached_adaptive_pool_test.cpp (original)
+++ trunk/libs/interprocess/test/cached_adaptive_pool_test.cpp 2011-08-27 04:31:23 EDT (Sat, 27 Aug 2011)
@@ -27,15 +27,15 @@
    <int, managed_shared_memory::segment_manager>
    cached_node_allocator_t;
 
-typedef detail::cached_adaptive_pool_v1
+typedef ipcdetail::cached_adaptive_pool_v1
    <int, managed_shared_memory::segment_manager>
    cached_node_allocator_v1_t;
 
 //Explicit instantiations to catch compilation errors
 template class cached_adaptive_pool<int, managed_shared_memory::segment_manager>;
-template class detail::cached_adaptive_pool_v1<int, managed_shared_memory::segment_manager>;
+template class ipcdetail::cached_adaptive_pool_v1<int, managed_shared_memory::segment_manager>;
 template class cached_adaptive_pool<void, managed_shared_memory::segment_manager>;
-template class detail::cached_adaptive_pool_v1<void, managed_shared_memory::segment_manager>;
+template class ipcdetail::cached_adaptive_pool_v1<void, managed_shared_memory::segment_manager>;
 
 //Alias list types
 typedef list<int, cached_node_allocator_t> MyShmList;

Modified: trunk/libs/interprocess/test/cached_node_allocator_test.cpp
==============================================================================
--- trunk/libs/interprocess/test/cached_node_allocator_test.cpp (original)
+++ trunk/libs/interprocess/test/cached_node_allocator_test.cpp 2011-08-27 04:31:23 EDT (Sat, 27 Aug 2011)
@@ -25,15 +25,15 @@
 typedef cached_node_allocator
    <int, managed_shared_memory::segment_manager>
    cached_node_allocator_t;
-typedef detail::cached_node_allocator_v1
+typedef ipcdetail::cached_node_allocator_v1
    <int, managed_shared_memory::segment_manager>
    cached_node_allocator_v1_t;
 
 //Explicit instantiations to catch compilation errors
 template class cached_node_allocator<int, managed_shared_memory::segment_manager>;
-template class detail::cached_node_allocator_v1<int, managed_shared_memory::segment_manager>;
+template class ipcdetail::cached_node_allocator_v1<int, managed_shared_memory::segment_manager>;
 template class cached_node_allocator<void, managed_shared_memory::segment_manager>;
-template class detail::cached_node_allocator_v1<void, managed_shared_memory::segment_manager>;
+template class ipcdetail::cached_node_allocator_v1<void, managed_shared_memory::segment_manager>;
 
 //Alias list types
 typedef list<int, cached_node_allocator_t> MyShmList;

Modified: trunk/libs/interprocess/test/deque_test.cpp
==============================================================================
--- trunk/libs/interprocess/test/deque_test.cpp (original)
+++ trunk/libs/interprocess/test/deque_test.cpp 2011-08-27 04:31:23 EDT (Sat, 27 Aug 2011)
@@ -49,14 +49,14 @@
 
 //Function to check if both sets are equal
 template<class V1, class V2>
-bool copyable_only(V1 *, V2 *, detail::false_type)
+bool copyable_only(V1 *, V2 *, ipcdetail::false_type)
 {
    return true;
 }
 
 //Function to check if both sets are equal
 template<class V1, class V2>
-bool copyable_only(V1 *shmdeque, V2 *stddeque, detail::true_type)
+bool copyable_only(V1 *shmdeque, V2 *stddeque, ipcdetail::true_type)
 {
    typedef typename V1::value_type IntType;
    std::size_t size = shmdeque->size();
@@ -256,7 +256,7 @@
          }
 
          if(!copyable_only(shmdeque, stddeque
- ,detail::bool_<!detail::is_same<IntType, test::movable_int>::value>())){
+ ,ipcdetail::bool_<!ipcdetail::is_same<IntType, test::movable_int>::value>())){
             return false;
          }
 

Modified: trunk/libs/interprocess/test/dummy_test_allocator.hpp
==============================================================================
--- trunk/libs/interprocess/test/dummy_test_allocator.hpp (original)
+++ trunk/libs/interprocess/test/dummy_test_allocator.hpp 2011-08-27 04:31:23 EDT (Sat, 27 Aug 2011)
@@ -57,9 +57,9 @@
    typedef T value_type;
    typedef T * pointer;
    typedef const T * const_pointer;
- typedef typename detail::add_reference
+ typedef typename ipcdetail::add_reference
                      <value_type>::type reference;
- typedef typename detail::add_reference
+ typedef typename ipcdetail::add_reference
                      <const value_type>::type const_reference;
    typedef std::size_t size_type;
    typedef std::ptrdiff_t difference_type;

Modified: trunk/libs/interprocess/test/emplace_test.hpp
==============================================================================
--- trunk/libs/interprocess/test/emplace_test.hpp (original)
+++ trunk/libs/interprocess/test/emplace_test.hpp 2011-08-27 04:31:23 EDT (Sat, 27 Aug 2011)
@@ -158,7 +158,7 @@
 
 
 template<class Container>
-bool test_emplace_back(detail::true_)
+bool test_emplace_back(ipcdetail::true_)
 {
    std::cout << "Starting test_emplace_back." << std::endl << " Class: "
       << typeid(Container).name() << std::endl;
@@ -195,11 +195,11 @@
 }
 
 template<class Container>
-bool test_emplace_back(detail::false_)
+bool test_emplace_back(ipcdetail::false_)
 { return true; }
 
 template<class Container>
-bool test_emplace_front(detail::true_)
+bool test_emplace_front(ipcdetail::true_)
 {
    std::cout << "Starting test_emplace_front." << std::endl << " Class: "
       << typeid(Container).name() << std::endl;
@@ -235,11 +235,11 @@
 }
 
 template<class Container>
-bool test_emplace_front(detail::false_)
+bool test_emplace_front(ipcdetail::false_)
 { return true; }
 
 template<class Container>
-bool test_emplace_before(detail::true_)
+bool test_emplace_before(ipcdetail::true_)
 {
    std::cout << "Starting test_emplace_before." << std::endl << " Class: "
       << typeid(Container).name() << std::endl;
@@ -310,11 +310,11 @@
 }
 
 template<class Container>
-bool test_emplace_before(detail::false_)
+bool test_emplace_before(ipcdetail::false_)
 { return true; }
 
 template<class Container>
-bool test_emplace_after(detail::true_)
+bool test_emplace_after(ipcdetail::true_)
 {
    std::cout << "Starting test_emplace_after." << std::endl << " Class: "
       << typeid(Container).name() << std::endl;
@@ -384,11 +384,11 @@
 }
 
 template<class Container>
-bool test_emplace_after(detail::false_)
+bool test_emplace_after(ipcdetail::false_)
 { return true; }
 
 template<class Container>
-bool test_emplace_assoc(detail::true_)
+bool test_emplace_assoc(ipcdetail::true_)
 {
    std::cout << "Starting test_emplace_assoc." << std::endl << " Class: "
       << typeid(Container).name() << std::endl;
@@ -424,11 +424,11 @@
 }
 
 template<class Container>
-bool test_emplace_assoc(detail::false_)
+bool test_emplace_assoc(ipcdetail::false_)
 { return true; }
 
 template<class Container>
-bool test_emplace_hint(detail::true_)
+bool test_emplace_hint(ipcdetail::true_)
 {
    std::cout << "Starting test_emplace_hint." << std::endl << " Class: "
       << typeid(Container).name() << std::endl;
@@ -467,11 +467,11 @@
 }
 
 template<class Container>
-bool test_emplace_hint(detail::false_)
+bool test_emplace_hint(ipcdetail::false_)
 { return true; }
 
 template<class Container>
-bool test_emplace_assoc_pair(detail::true_)
+bool test_emplace_assoc_pair(ipcdetail::true_)
 {
    std::cout << "Starting test_emplace_assoc_pair." << std::endl << " Class: "
       << typeid(Container).name() << std::endl;
@@ -526,11 +526,11 @@
 }
 
 template<class Container>
-bool test_emplace_assoc_pair(detail::false_)
+bool test_emplace_assoc_pair(ipcdetail::false_)
 { return true; }
 
 template<class Container>
-bool test_emplace_hint_pair(detail::true_)
+bool test_emplace_hint_pair(ipcdetail::true_)
 {
    std::cout << "Starting test_emplace_hint_pair." << std::endl << " Class: "
       << typeid(Container).name() << std::endl;
@@ -585,14 +585,14 @@
 }
 
 template<class Container>
-bool test_emplace_hint_pair(detail::false_)
+bool test_emplace_hint_pair(ipcdetail::false_)
 { return true; }
 
 template <EmplaceOptions O, EmplaceOptions Mask>
 struct emplace_active
 {
    static const bool value = (0 != (O & Mask));
- typedef detail::bool_<value> type;
+ typedef ipcdetail::bool_<value> type;
    operator type() const{ return type(); }
 };
 

Modified: trunk/libs/interprocess/test/expand_bwd_test_allocator.hpp
==============================================================================
--- trunk/libs/interprocess/test/expand_bwd_test_allocator.hpp (original)
+++ trunk/libs/interprocess/test/expand_bwd_test_allocator.hpp 2011-08-27 04:31:23 EDT (Sat, 27 Aug 2011)
@@ -57,9 +57,9 @@
    typedef T value_type;
    typedef T * pointer;
    typedef const T * const_pointer;
- typedef typename detail::add_reference
+ typedef typename ipcdetail::add_reference
                      <value_type>::type reference;
- typedef typename detail::add_reference
+ typedef typename ipcdetail::add_reference
                      <const value_type>::type const_reference;
    typedef std::size_t size_type;
    typedef std::ptrdiff_t difference_type;
@@ -110,9 +110,9 @@
 
    friend void swap(self_t &alloc1, self_t &alloc2)
    {
- detail::do_swap(alloc1.mp_buffer, alloc2.mp_buffer);
- detail::do_swap(alloc1.m_size, alloc2.m_size);
- detail::do_swap(alloc1.m_offset, alloc2.m_offset);
+ ipcdetail::do_swap(alloc1.mp_buffer, alloc2.mp_buffer);
+ ipcdetail::do_swap(alloc1.m_size, alloc2.m_size);
+ ipcdetail::do_swap(alloc1.m_offset, alloc2.m_offset);
    }
 
    //Experimental version 2 expand_bwd_test_allocator functions

Modified: trunk/libs/interprocess/test/file_lock_test.cpp
==============================================================================
--- trunk/libs/interprocess/test/file_lock_test.cpp (original)
+++ trunk/libs/interprocess/test/file_lock_test.cpp 2011-08-27 04:31:23 EDT (Sat, 27 Aug 2011)
@@ -24,7 +24,7 @@
 static const std::size_t FileSize = 1000;
 inline std::string get_filename()
 {
- std::string ret (detail::get_temporary_path());
+ std::string ret (ipcdetail::get_temporary_path());
    ret += "/";
    ret += test::get_process_id_name();
    return ret;

Modified: trunk/libs/interprocess/test/file_mapping_test.cpp
==============================================================================
--- trunk/libs/interprocess/test/file_mapping_test.cpp (original)
+++ trunk/libs/interprocess/test/file_mapping_test.cpp 2011-08-27 04:31:23 EDT (Sat, 27 Aug 2011)
@@ -23,7 +23,7 @@
 
 inline std::string get_filename()
 {
- std::string ret (detail::get_temporary_path());
+ std::string ret (ipcdetail::get_temporary_path());
    ret += "/";
    ret += test::get_process_id_name();
    return ret;

Modified: trunk/libs/interprocess/test/get_process_id_name.hpp
==============================================================================
--- trunk/libs/interprocess/test/get_process_id_name.hpp (original)
+++ trunk/libs/interprocess/test/get_process_id_name.hpp 2011-08-27 04:31:23 EDT (Sat, 27 Aug 2011)
@@ -23,7 +23,7 @@
 inline void get_process_id_name(std::string &str)
 {
    std::stringstream sstr;
- sstr << "process_" << boost::interprocess::detail::get_current_process_id() << std::ends;
+ sstr << "process_" << boost::interprocess::ipcdetail::get_current_process_id() << std::ends;
    str = sstr.str().c_str();
 }
 

Modified: trunk/libs/interprocess/test/heap_allocator_v1.hpp
==============================================================================
--- trunk/libs/interprocess/test/heap_allocator_v1.hpp (original)
+++ trunk/libs/interprocess/test/heap_allocator_v1.hpp 2011-08-27 04:31:23 EDT (Sat, 27 Aug 2011)
@@ -70,9 +70,9 @@
       <cvoid_ptr, T>::type pointer;
    typedef typename boost::
       pointer_to_other<pointer, const T>::type const_pointer;
- typedef typename detail::add_reference
+ typedef typename ipcdetail::add_reference
                      <value_type>::type reference;
- typedef typename detail::add_reference
+ typedef typename ipcdetail::add_reference
                      <const value_type>::type const_reference;
    typedef typename SegmentManager::size_type size_type;
    typedef typename SegmentManager::difference_type difference_type;
@@ -86,7 +86,7 @@
 
    //!Returns the segment manager. Never throws
    segment_manager* get_segment_manager()const
- { return detail::get_pointer(mp_mngr); }
+ { return ipcdetail::get_pointer(mp_mngr); }
 /*
    //!Returns address of mutable object. Never throws
    pointer address(reference value) const
@@ -116,12 +116,12 @@
 
    //!Deallocates memory previously allocated. Never throws
    void deallocate(const pointer &ptr, size_type)
- { return ::delete[] detail::get_pointer(ptr) ; }
+ { return ::delete[] ipcdetail::get_pointer(ptr) ; }
 
    //!Construct object, calling constructor.
    //!Throws if T(const T&) throws
    void construct(const pointer &ptr, const_reference value)
- { new((void*)detail::get_pointer(ptr)) value_type(value); }
+ { new((void*)ipcdetail::get_pointer(ptr)) value_type(value); }
 
    //!Destroys object. Throws if object's destructor throws
    void destroy(const pointer &ptr)
@@ -134,7 +134,7 @@
    //!Swap segment manager. Does not throw. If each heap_allocator_v1 is placed in
    //!different memory segments, the result is undefined.
    friend void swap(self_t &alloc1, self_t &alloc2)
- { detail::do_swap(alloc1.mp_mngr, alloc2.mp_mngr); }
+ { ipcdetail::do_swap(alloc1.mp_mngr, alloc2.mp_mngr); }
 };
 
 //!Equality test for same type of heap_allocator_v1

Modified: trunk/libs/interprocess/test/intermodule_singleton_test.cpp
==============================================================================
--- trunk/libs/interprocess/test/intermodule_singleton_test.cpp (original)
+++ trunk/libs/interprocess/test/intermodule_singleton_test.cpp 2011-08-27 04:31:23 EDT (Sat, 27 Aug 2011)
@@ -92,12 +92,12 @@
 
 int main ()
 {
- if(0 != intermodule_singleton_test<detail::portable_intermodule_singleton>()){
+ if(0 != intermodule_singleton_test<ipcdetail::portable_intermodule_singleton>()){
       return 1;
    }
 
    #ifdef BOOST_INTERPROCESS_WINDOWS
- if(0 != intermodule_singleton_test<detail::windows_intermodule_singleton>()){
+ if(0 != intermodule_singleton_test<ipcdetail::windows_intermodule_singleton>()){
       return 1;
    }
    #endif

Modified: trunk/libs/interprocess/test/intersegment_ptr_test.cpp
==============================================================================
--- trunk/libs/interprocess/test/intersegment_ptr_test.cpp (original)
+++ trunk/libs/interprocess/test/intersegment_ptr_test.cpp 2011-08-27 04:31:23 EDT (Sat, 27 Aug 2011)
@@ -27,13 +27,13 @@
    typedef intersegment_ptr<volatile int> pvint_t;
    typedef intersegment_ptr<const volatile int> pcvint_t;
 
- if(!detail::is_same<pint_t::value_type, int>::value)
+ if(!ipcdetail::is_same<pint_t::value_type, int>::value)
       return false;
- if(!detail::is_same<pcint_t::value_type, const int>::value)
+ if(!ipcdetail::is_same<pcint_t::value_type, const int>::value)
       return false;
- if(!detail::is_same<pvint_t::value_type, volatile int>::value)
+ if(!ipcdetail::is_same<pvint_t::value_type, volatile int>::value)
       return false;
- if(!detail::is_same<pcvint_t::value_type, const volatile int>::value)
+ if(!ipcdetail::is_same<pcvint_t::value_type, const volatile int>::value)
       return false;
    int dummy_int = 9;
 

Modified: trunk/libs/interprocess/test/managed_mapped_file_test.cpp
==============================================================================
--- trunk/libs/interprocess/test/managed_mapped_file_test.cpp (original)
+++ trunk/libs/interprocess/test/managed_mapped_file_test.cpp 2011-08-27 04:31:23 EDT (Sat, 27 Aug 2011)
@@ -20,7 +20,7 @@
 
 inline std::string get_filename()
 {
- std::string ret (detail::get_temporary_path());
+ std::string ret (ipcdetail::get_temporary_path());
    ret += "/";
    ret += test::get_process_id_name();
    return ret;

Modified: trunk/libs/interprocess/test/managed_xsi_shared_memory_test.cpp
==============================================================================
--- trunk/libs/interprocess/test/managed_xsi_shared_memory_test.cpp (original)
+++ trunk/libs/interprocess/test/managed_xsi_shared_memory_test.cpp 2011-08-27 04:31:23 EDT (Sat, 27 Aug 2011)
@@ -52,7 +52,7 @@
 
 inline std::string get_filename()
 {
- std::string ret (detail::get_temporary_path());
+ std::string ret (ipcdetail::get_temporary_path());
    ret += "/";
    ret += test::get_process_id_name();
    return ret;
@@ -65,7 +65,7 @@
    const char *const ShmemName = filename.c_str();
 
    file_mapping::remove(ShmemName);
- { detail::file_wrapper(create_only, ShmemName, read_write); }
+ { ipcdetail::file_wrapper(create_only, ShmemName, read_write); }
    xsi_key key(ShmemName, 1);
    file_mapping::remove(ShmemName);
    int shmid;

Modified: trunk/libs/interprocess/test/mapped_file_test.cpp
==============================================================================
--- trunk/libs/interprocess/test/mapped_file_test.cpp (original)
+++ trunk/libs/interprocess/test/mapped_file_test.cpp 2011-08-27 04:31:23 EDT (Sat, 27 Aug 2011)
@@ -26,7 +26,7 @@
 static const std::size_t FileSize = 1000;
 inline std::string get_filename()
 {
- std::string ret (detail::get_temporary_path());
+ std::string ret (ipcdetail::get_temporary_path());
    ret += "/";
    ret += test::get_process_id_name();
    return ret;
@@ -45,11 +45,11 @@
 //in generic named_creation_template functions
 class mapped_file_creation_test_wrapper
    : public file_destroyer
- , public boost::interprocess::detail::managed_open_or_create_impl
- <boost::interprocess::detail::file_wrapper>
+ , public boost::interprocess::ipcdetail::managed_open_or_create_impl
+ <boost::interprocess::ipcdetail::file_wrapper>
 {
- typedef boost::interprocess::detail::managed_open_or_create_impl
- <boost::interprocess::detail::file_wrapper> mapped_file;
+ typedef boost::interprocess::ipcdetail::managed_open_or_create_impl
+ <boost::interprocess::ipcdetail::file_wrapper> mapped_file;
    public:
    mapped_file_creation_test_wrapper(boost::interprocess::create_only_t)
       : mapped_file(boost::interprocess::create_only, get_filename().c_str(), FileSize, read_write, 0, permissions())
@@ -66,8 +66,8 @@
 
 int main ()
 {
- typedef boost::interprocess::detail::managed_open_or_create_impl
- <boost::interprocess::detail::file_wrapper> mapped_file;
+ typedef boost::interprocess::ipcdetail::managed_open_or_create_impl
+ <boost::interprocess::ipcdetail::file_wrapper> mapped_file;
    file_mapping::remove(get_filename().c_str());
    test::test_named_creation<mapped_file_creation_test_wrapper>();
 

Modified: trunk/libs/interprocess/test/memory_algorithm_test_template.hpp
==============================================================================
--- trunk/libs/interprocess/test/memory_algorithm_test_template.hpp (original)
+++ trunk/libs/interprocess/test/memory_algorithm_test_template.hpp 2011-08-27 04:31:23 EDT (Sat, 27 Aug 2011)
@@ -679,7 +679,7 @@
 
          typename multiallocation_chain::size_type n = chain.size();
          while(!chain.empty()){
- buffers.push_back(detail::get_pointer(chain.front()));
+ buffers.push_back(ipcdetail::get_pointer(chain.front()));
             chain.pop_front();
          }
          if(n != std::size_t((i+1)*2))
@@ -788,7 +788,7 @@
             break;
          typename multiallocation_chain::size_type n = chain.size();
          while(!chain.empty()){
- buffers.push_back(detail::get_pointer(chain.front()));
+ buffers.push_back(ipcdetail::get_pointer(chain.front()));
             chain.pop_front();
          }
          if(n != ArraySize)

Modified: trunk/libs/interprocess/test/mutex_test_template.hpp
==============================================================================
--- trunk/libs/interprocess/test/mutex_test_template.hpp (original)
+++ trunk/libs/interprocess/test/mutex_test_template.hpp 2011-08-27 04:31:23 EDT (Sat, 27 Aug 2011)
@@ -181,6 +181,28 @@
 }
 
 template<typename M>
+void lock_and_catch_errors(void *arg, M &sm)
+{
+ data<M> *pdata = static_cast<data<M>*>(arg);
+ try
+ {
+ boost::interprocess::scoped_lock<M> l(sm);
+ if(pdata->m_secs){
+ boost::thread::sleep(xsecs(pdata->m_secs));
+ }
+ else{
+ boost::thread::sleep(xsecs(2*BaseSeconds));
+ }
+ ++shared_val;
+ pdata->m_value = shared_val;
+ }
+ catch(interprocess_exception const & e)
+ {
+ pdata->m_error = e.get_error_code();
+ }
+}
+
+template<typename M>
 void try_lock_and_sleep(void *arg, M &sm)
 {
    data<M> *pdata = static_cast<data<M>*>(arg);
@@ -244,6 +266,49 @@
 }
 
 template<bool SameObject, typename M>
+void test_mutex_lock_timeout()
+{
+ shared_val = 0;
+
+ M m1, m2;
+ M *pm1, *pm2;
+
+ if(SameObject){
+ pm1 = pm2 = &m1;
+ }
+ else{
+ pm1 = &m1;
+ pm2 = &m2;
+ }
+
+ int wait_time_s = BOOST_INTERPROCESS_TIMEOUT_WHEN_LOCKING_DURATION_MS / 1000;
+ if (wait_time_s == 0 )
+ wait_time_s = 1;
+
+ data<M> d1(1, wait_time_s * 2);
+ data<M> d2(2, wait_time_s * 2);
+
+ // Locker one launches, and holds the lock for wait_time_s * 2 seconds.
+ boost::thread tm1(thread_adapter<M>(&lock_and_sleep, &d1, *pm1));
+
+ //Wait 1*BaseSeconds
+ boost::thread::sleep(xsecs(wait_time_s));
+
+ // Locker two launches, and attempts to hold the lock for wait_time_s * 2 seconds.
+ boost::thread tm2(thread_adapter<M>(&lock_and_catch_errors, &d2, *pm2));
+
+ //Wait completion
+ tm1.join();
+ boost::thread::sleep(xsecs(1*BaseSeconds));
+ tm2.join();
+
+ assert(d1.m_value == 1);
+ assert(d2.m_value == -1);
+ assert(d1.m_error == no_error);
+ assert(d2.m_error == boost::interprocess::timeout_when_locking_error);
+}
+
+template<bool SameObject, typename M>
 void test_mutex_try_lock()
 {
    shared_val = 0;

Added: trunk/libs/interprocess/test/mutex_timeout_test.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/interprocess/test/mutex_timeout_test.cpp 2011-08-27 04:31:23 EDT (Sat, 27 Aug 2011)
@@ -0,0 +1,31 @@
+//////////////////////////////////////////////////////////////////////////////
+//
+// (C) Copyright Ion Gaztanaga 2004-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)
+//
+// See http://www.boost.org/libs/interprocess for documentation.
+//
+//////////////////////////////////////////////////////////////////////////////
+
+// enable timeout feature
+#define BOOST_INTERPROCESS_ENABLE_TIMEOUT_WHEN_LOCKING
+#define BOOST_INTERPROCESS_TIMEOUT_WHEN_LOCKING_DURATION_MS 1000
+
+#include <boost/assert.hpp>
+#include <boost/interprocess/detail/config_begin.hpp>
+#include <boost/interprocess/sync/interprocess_mutex.hpp>
+#include <boost/interprocess/sync/interprocess_recursive_mutex.hpp>
+#include "mutex_test_template.hpp"
+
+int main ()
+{
+ using namespace boost::interprocess;
+
+ test::test_mutex_lock_timeout<true, interprocess_mutex>();
+ test::test_mutex_lock_timeout<true, interprocess_recursive_mutex>();
+
+ return 0;
+}
+
+#include <boost/interprocess/detail/config_end.hpp>

Modified: trunk/libs/interprocess/test/named_condition_test.cpp
==============================================================================
--- trunk/libs/interprocess/test/named_condition_test.cpp (original)
+++ trunk/libs/interprocess/test/named_condition_test.cpp 2011-08-27 04:31:23 EDT (Sat, 27 Aug 2011)
@@ -78,7 +78,7 @@
 
    ~named_condition_creation_test_wrapper() {
       if(--count_){
- detail::interprocess_tester::
+ ipcdetail::interprocess_tester::
             dont_close_on_destruction(static_cast<named_condition&>(*this));
       }
    }

Modified: trunk/libs/interprocess/test/named_construct_test.cpp
==============================================================================
--- trunk/libs/interprocess/test/named_construct_test.cpp (original)
+++ trunk/libs/interprocess/test/named_construct_test.cpp 2011-08-27 04:31:23 EDT (Sat, 27 Aug 2011)
@@ -50,11 +50,11 @@
    typedef simple_pair simple_type;
    typedef array_pair array_type;
    typedef array_it_pair array_it_type;
- static const detail::unique_instance_t *get_simple_name()
+ static const ipcdetail::unique_instance_t *get_simple_name()
    { return 0; }
- static const detail::unique_instance_t *get_array_name()
+ static const ipcdetail::unique_instance_t *get_array_name()
    { return 0; }
- static const detail::unique_instance_t *get_array_it_name()
+ static const ipcdetail::unique_instance_t *get_array_it_name()
    { return 0; }
 };
 
@@ -65,11 +65,11 @@
    typedef simple_pair simple_type;
    typedef array_pair array_type;
    typedef array_it_pair array_it_type;
- static const detail::anonymous_instance_t *get_simple_name()
+ static const ipcdetail::anonymous_instance_t *get_simple_name()
    { return 0; }
- static const detail::anonymous_instance_t *get_array_name()
+ static const ipcdetail::anonymous_instance_t *get_array_name()
    { return 0; }
- static const detail::anonymous_instance_t *get_array_it_name()
+ static const ipcdetail::anonymous_instance_t *get_array_it_name()
    { return 0; }
 };
 

Modified: trunk/libs/interprocess/test/named_mutex_test.cpp
==============================================================================
--- trunk/libs/interprocess/test/named_mutex_test.cpp (original)
+++ trunk/libs/interprocess/test/named_mutex_test.cpp 2011-08-27 04:31:23 EDT (Sat, 27 Aug 2011)
@@ -38,7 +38,7 @@
    ~named_mutex_lock_test_wrapper()
    {
       if(--count_){
- detail::interprocess_tester::
+ ipcdetail::interprocess_tester::
             dont_close_on_destruction(static_cast<named_mutex&>(*this));
       }
    }
@@ -69,7 +69,7 @@
    ~named_mutex_creation_test_wrapper()
    {
       if(--count_){
- detail::interprocess_tester::
+ ipcdetail::interprocess_tester::
             dont_close_on_destruction(static_cast<named_mutex&>(*this));
       }
    }

Modified: trunk/libs/interprocess/test/named_recursive_mutex_test.cpp
==============================================================================
--- trunk/libs/interprocess/test/named_recursive_mutex_test.cpp (original)
+++ trunk/libs/interprocess/test/named_recursive_mutex_test.cpp 2011-08-27 04:31:23 EDT (Sat, 27 Aug 2011)
@@ -38,7 +38,7 @@
    ~named_recursive_mutex_lock_test_wrapper()
    {
       if(--count_){
- detail::interprocess_tester::
+ ipcdetail::interprocess_tester::
             dont_close_on_destruction(static_cast<named_recursive_mutex&>(*this));
       }
    }
@@ -69,7 +69,7 @@
    ~named_mutex_creation_test_wrapper()
    {
       if(--count_){
- detail::interprocess_tester::
+ ipcdetail::interprocess_tester::
             dont_close_on_destruction(static_cast<named_recursive_mutex&>(*this));
       }
    }

Modified: trunk/libs/interprocess/test/named_semaphore_test.cpp
==============================================================================
--- trunk/libs/interprocess/test/named_semaphore_test.cpp (original)
+++ trunk/libs/interprocess/test/named_semaphore_test.cpp 2011-08-27 04:31:23 EDT (Sat, 27 Aug 2011)
@@ -55,7 +55,7 @@
    ~named_semaphore_test_wrapper()
    {
       if(--count_){
- detail::interprocess_tester::
+ ipcdetail::interprocess_tester::
             dont_close_on_destruction(static_cast<named_semaphore&>(*this));
       }
    }

Modified: trunk/libs/interprocess/test/named_upgradable_mutex_test.cpp
==============================================================================
--- trunk/libs/interprocess/test/named_upgradable_mutex_test.cpp (original)
+++ trunk/libs/interprocess/test/named_upgradable_mutex_test.cpp 2011-08-27 04:31:23 EDT (Sat, 27 Aug 2011)
@@ -37,7 +37,7 @@
    ~named_upgradable_mutex_lock_test_wrapper()
    {
       if(--count_){
- detail::interprocess_tester::
+ ipcdetail::interprocess_tester::
             dont_close_on_destruction(static_cast<named_upgradable_mutex&>(*this));
       }
    }
@@ -72,7 +72,7 @@
    ~named_upgradable_mutex_creation_test_wrapper()
    {
       if(--count_){
- detail::interprocess_tester::
+ ipcdetail::interprocess_tester::
             dont_close_on_destruction(static_cast<named_upgradable_mutex&>(*this));
       }
    }

Modified: trunk/libs/interprocess/test/node_allocator_test.cpp
==============================================================================
--- trunk/libs/interprocess/test/node_allocator_test.cpp (original)
+++ trunk/libs/interprocess/test/node_allocator_test.cpp 2011-08-27 04:31:23 EDT (Sat, 27 Aug 2011)
@@ -25,14 +25,14 @@
 //Alias an integer node allocator type
 typedef node_allocator
    <int, managed_shared_memory::segment_manager> shmem_node_allocator_t;
-typedef detail::node_allocator_v1
+typedef ipcdetail::node_allocator_v1
    <int, managed_shared_memory::segment_manager> shmem_node_allocator_v1_t;
 
 //Explicit instantiations to catch compilation errors
 template class node_allocator<int, managed_shared_memory::segment_manager>;
-template class detail::node_allocator_v1<int, managed_shared_memory::segment_manager>;
+template class ipcdetail::node_allocator_v1<int, managed_shared_memory::segment_manager>;
 template class node_allocator<void, managed_shared_memory::segment_manager>;
-template class detail::node_allocator_v1<void, managed_shared_memory::segment_manager>;
+template class ipcdetail::node_allocator_v1<void, managed_shared_memory::segment_manager>;
 
 //Alias list types
 typedef list<int, shmem_node_allocator_t> MyShmList;

Modified: trunk/libs/interprocess/test/node_pool_test.cpp
==============================================================================
--- trunk/libs/interprocess/test/node_pool_test.cpp (original)
+++ trunk/libs/interprocess/test/node_pool_test.cpp 2011-08-27 04:31:23 EDT (Sat, 27 Aug 2011)
@@ -17,7 +17,7 @@
 
 int main ()
 {
- typedef detail::private_node_pool
+ typedef ipcdetail::private_node_pool
       <segment_manager_t, 4, 64> node_pool_t;
 
    if(!test::test_all_node_pool<node_pool_t>())

Modified: trunk/libs/interprocess/test/offset_ptr_test.cpp
==============================================================================
--- trunk/libs/interprocess/test/offset_ptr_test.cpp (original)
+++ trunk/libs/interprocess/test/offset_ptr_test.cpp 2011-08-27 04:31:23 EDT (Sat, 27 Aug 2011)
@@ -21,13 +21,13 @@
    typedef offset_ptr<volatile int> pvint_t;
    typedef offset_ptr<const volatile int> pcvint_t;
 
- if(!detail::is_same<pint_t::value_type, int>::value)
+ if(!ipcdetail::is_same<pint_t::value_type, int>::value)
       return false;
- if(!detail::is_same<pcint_t::value_type, const int>::value)
+ if(!ipcdetail::is_same<pcint_t::value_type, const int>::value)
       return false;
- if(!detail::is_same<pvint_t::value_type, volatile int>::value)
+ if(!ipcdetail::is_same<pvint_t::value_type, volatile int>::value)
       return false;
- if(!detail::is_same<pcvint_t::value_type, const volatile int>::value)
+ if(!ipcdetail::is_same<pcvint_t::value_type, const volatile int>::value)
       return false;
    int dummy_int = 9;
 

Modified: trunk/libs/interprocess/test/private_adaptive_pool_test.cpp
==============================================================================
--- trunk/libs/interprocess/test/private_adaptive_pool_test.cpp (original)
+++ trunk/libs/interprocess/test/private_adaptive_pool_test.cpp 2011-08-27 04:31:23 EDT (Sat, 27 Aug 2011)
@@ -25,14 +25,14 @@
 //Alias a private adaptive pool that allocates ints
 typedef private_adaptive_pool
    <int, managed_shared_memory::segment_manager> priv_node_allocator_t;
-typedef detail::private_adaptive_pool_v1
+typedef ipcdetail::private_adaptive_pool_v1
    <int, managed_shared_memory::segment_manager> priv_node_allocator_v1_t;
 
 //Explicit instantiations to catch compilation errors
 template class private_adaptive_pool<int, managed_shared_memory::segment_manager>;
-template class detail::private_adaptive_pool_v1<int, managed_shared_memory::segment_manager>;
+template class ipcdetail::private_adaptive_pool_v1<int, managed_shared_memory::segment_manager>;
 template class private_adaptive_pool<void, managed_shared_memory::segment_manager>;
-template class detail::private_adaptive_pool_v1<void, managed_shared_memory::segment_manager>;
+template class ipcdetail::private_adaptive_pool_v1<void, managed_shared_memory::segment_manager>;
 
 //Alias list types
 typedef list<int, priv_node_allocator_t> MyShmList;

Modified: trunk/libs/interprocess/test/private_node_allocator_test.cpp
==============================================================================
--- trunk/libs/interprocess/test/private_node_allocator_test.cpp (original)
+++ trunk/libs/interprocess/test/private_node_allocator_test.cpp 2011-08-27 04:31:23 EDT (Sat, 27 Aug 2011)
@@ -25,14 +25,14 @@
 //Alias an integer node allocator type
 typedef private_node_allocator
    <int, managed_shared_memory::segment_manager> priv_node_allocator_t;
-typedef detail::private_node_allocator_v1
+typedef ipcdetail::private_node_allocator_v1
    <int, managed_shared_memory::segment_manager> priv_node_allocator_v1_t;
 
 //Explicit instantiations to catch compilation errors
 template class private_node_allocator<int, managed_shared_memory::segment_manager>;
-template class detail::private_node_allocator_v1<int, managed_shared_memory::segment_manager>;
+template class ipcdetail::private_node_allocator_v1<int, managed_shared_memory::segment_manager>;
 template class private_node_allocator<void, managed_shared_memory::segment_manager>;
-template class detail::private_node_allocator_v1<void, managed_shared_memory::segment_manager>;
+template class ipcdetail::private_node_allocator_v1<void, managed_shared_memory::segment_manager>;
 
 //Alias list types
 typedef list<int, priv_node_allocator_t> MyShmList;

Modified: trunk/libs/interprocess/test/robust_emulation_test.cpp
==============================================================================
--- trunk/libs/interprocess/test/robust_emulation_test.cpp (original)
+++ trunk/libs/interprocess/test/robust_emulation_test.cpp 2011-08-27 04:31:23 EDT (Sat, 27 Aug 2011)
@@ -16,7 +16,7 @@
 {
    using namespace boost::interprocess;
    return test::robust_mutex_test
- < detail::robust_emulation_mutex<detail::emulation_mutex> >(argc, argv);
+ < ipcdetail::robust_emulation_mutex<ipcdetail::emulation_mutex> >(argc, argv);
 }
 
 #include <boost/interprocess/detail/config_end.hpp>

Modified: trunk/libs/interprocess/test/robust_mutex_test.hpp
==============================================================================
--- trunk/libs/interprocess/test/robust_mutex_test.hpp (original)
+++ trunk/libs/interprocess/test/robust_mutex_test.hpp 2011-08-27 04:31:23 EDT (Sat, 27 Aug 2011)
@@ -66,7 +66,7 @@
 
       //Wait until child locks the mutexes and dies
       while(!*go_ahead){
- detail::thread_yield();
+ ipcdetail::thread_yield();
       }
       
       std::cout << "... recovering mutex[0]" << std::endl;
@@ -163,7 +163,7 @@
 
          //Wait until child locks the 2nd mutex and dies
          while(!*go_ahead2){
- detail::thread_yield();
+ ipcdetail::thread_yield();
          }
 
          //Done, now try to lock number 3 to see if robust

Modified: trunk/libs/interprocess/test/robust_recursive_emulation_test.cpp
==============================================================================
--- trunk/libs/interprocess/test/robust_recursive_emulation_test.cpp (original)
+++ trunk/libs/interprocess/test/robust_recursive_emulation_test.cpp 2011-08-27 04:31:23 EDT (Sat, 27 Aug 2011)
@@ -17,7 +17,7 @@
    using namespace boost::interprocess;
 
    return test::robust_mutex_test
- < detail::robust_emulation_mutex<detail::emulation_recursive_mutex> >(argc, argv);
+ < ipcdetail::robust_emulation_mutex<ipcdetail::emulation_recursive_mutex> >(argc, argv);
 }
 
 #include <boost/interprocess/detail/config_end.hpp>

Modified: trunk/libs/interprocess/test/shared_memory_mapping_test.cpp
==============================================================================
--- trunk/libs/interprocess/test/shared_memory_mapping_test.cpp (original)
+++ trunk/libs/interprocess/test/shared_memory_mapping_test.cpp 2011-08-27 04:31:23 EDT (Sat, 27 Aug 2011)
@@ -27,20 +27,24 @@
 
 int main ()
 {
+ std::string process_id = test::get_process_id_name();
+ std::string process_id2(process_id);
+ process_id2 += "_2";
    try{
       const std::size_t FileSize = 99999*2;
       {
          //Remove shared memory
- shared_memory_object::remove(test::get_process_id_name());
+ shared_memory_object::remove(process_id.c_str());
+ shared_memory_object::remove(process_id2.c_str());
 
          //Create shared memory and file mapping
- shared_memory_object mapping(create_only, test::get_process_id_name(), read_write);
+ shared_memory_object mapping(create_only, process_id.c_str(), read_write);
          mapping.truncate(FileSize);
       }
 
       {
          //Create a file mapping
- shared_memory_object mapping(open_only, test::get_process_id_name(), read_write);
+ shared_memory_object mapping(open_only, process_id.c_str(), read_write);
 
          //Create two mapped regions, one half of the file each
          mapped_region region (mapping
@@ -77,7 +81,7 @@
       //See if the pattern is correct in the file using two mapped regions
       {
          //Create a file mapping
- shared_memory_object mapping(open_only, test::get_process_id_name(), read_write);
+ shared_memory_object mapping(open_only, process_id.c_str(), read_write);
          mapped_region region(mapping, read_write, 0, FileSize/2, 0);
          mapped_region region2(mapping, read_write, FileSize/2, FileSize - FileSize/2, 0);
 
@@ -107,11 +111,10 @@
       //Now check the pattern mapping a single read only mapped_region
       {
          //Create a file mapping
- shared_memory_object mapping(open_only, test::get_process_id_name(), read_only);
+ shared_memory_object mapping(open_only, process_id.c_str(), read_only);
 
          //Create a single regions, mapping all the file
- mapped_region region (mapping
- ,read_only);
+ mapped_region region (mapping, read_only);
 
          //Check pattern
          unsigned char *pattern = static_cast<unsigned char*>(region.get_address());
@@ -124,6 +127,27 @@
          }
       }
       {
+ //Check for busy address space
+ shared_memory_object mapping(open_only, process_id.c_str(), read_only);
+ mapped_region region (mapping, read_only);
+ shared_memory_object mapping2(create_only, process_id2.c_str(), read_write);
+ mapping2.truncate(FileSize);
+ try{
+ mapped_region region2 (mapping2, read_only, 0, FileSize, region.get_address());
+ }
+ catch(interprocess_exception &e){
+ shared_memory_object::remove(process_id2.c_str());
+ if(e.get_error_code() != busy_error){
+ throw e;
+ }
+ }
+ catch(std::exception &){
+ shared_memory_object::remove(process_id2.c_str());
+ throw;
+ }
+ shared_memory_object::remove(process_id2.c_str());
+ }
+ {
          //Now check anonymous mapping
          mapped_region region(anonymous_shared_memory(FileSize));
 
@@ -147,7 +171,7 @@
       }
       {
          //Now test move semantics
- shared_memory_object mapping(open_only, test::get_process_id_name(), read_write);
+ shared_memory_object mapping(open_only, process_id.c_str(), read_write);
          shared_memory_object move_ctor(boost::interprocess::move(mapping));
          shared_memory_object move_assign;
          move_assign = boost::interprocess::move(move_ctor);
@@ -155,10 +179,11 @@
       }
    }
    catch(std::exception &exc){
- shared_memory_object::remove(test::get_process_id_name());
+ shared_memory_object::remove(process_id.c_str());
+ shared_memory_object::remove(process_id2.c_str());
       std::cout << "Unhandled exception: " << exc.what() << std::endl;
       return 1;
    }
- shared_memory_object::remove(test::get_process_id_name());
+ shared_memory_object::remove(process_id.c_str());
    return 0;
 }

Modified: trunk/libs/interprocess/test/shared_memory_test.cpp
==============================================================================
--- trunk/libs/interprocess/test/shared_memory_test.cpp (original)
+++ trunk/libs/interprocess/test/shared_memory_test.cpp 2011-08-27 04:31:23 EDT (Sat, 27 Aug 2011)
@@ -31,7 +31,7 @@
    }
 };
 
-typedef detail::managed_open_or_create_impl<shared_memory_object> shared_memory;
+typedef ipcdetail::managed_open_or_create_impl<shared_memory_object> shared_memory;
 
 //This wrapper is necessary to have a common constructor
 //in generic named_creation_template functions

Modified: trunk/libs/interprocess/test/shared_ptr_test.cpp
==============================================================================
--- trunk/libs/interprocess/test/shared_ptr_test.cpp (original)
+++ trunk/libs/interprocess/test/shared_ptr_test.cpp 2011-08-27 04:31:23 EDT (Sat, 27 Aug 2011)
@@ -585,7 +585,7 @@
          int_shared_ptr p;
          int_shared_ptr p2( p, &m );
 
- BOOST_TEST( detail::get_pointer(p2.get()) == &m );
+ BOOST_TEST( ipcdetail::get_pointer(p2.get()) == &m );
          BOOST_TEST( p2? true: false );
          BOOST_TEST( !!p2 );
          BOOST_TEST( p2.use_count() == p.use_count() );
@@ -607,7 +607,7 @@
             (shmem.construct<int>(anonymous_instance)(), shmem));
          const_int_shared_ptr p2( p, &m );
 
- BOOST_TEST( detail::get_pointer(p2.get()) == &m );
+ BOOST_TEST( ipcdetail::get_pointer(p2.get()) == &m );
          BOOST_TEST( p2? true: false );
          BOOST_TEST( !!p2 );
          BOOST_TEST( p2.use_count() == p.use_count() );

Modified: trunk/libs/interprocess/test/tree_test.cpp
==============================================================================
--- trunk/libs/interprocess/test/tree_test.cpp (original)
+++ trunk/libs/interprocess/test/tree_test.cpp 2011-08-27 04:31:23 EDT (Sat, 27 Aug 2011)
@@ -171,7 +171,7 @@
       test_move<multimap<recursive_multimap, recursive_multimap> >();
    }
 
- using namespace boost::interprocess::detail;
+ using namespace boost::interprocess::ipcdetail;
 
    if(0 != test::set_test<my_managed_shared_memory
                         ,MyShmSet

Modified: trunk/libs/interprocess/test/util.hpp
==============================================================================
--- trunk/libs/interprocess/test/util.hpp (original)
+++ trunk/libs/interprocess/test/util.hpp 2011-08-27 04:31:23 EDT (Sat, 27 Aug 2011)
@@ -94,11 +94,12 @@
 struct data
 {
    data(int id, int secs=0)
- : m_id(id), m_value(-1), m_secs(secs)
+ : m_id(id), m_value(-1), m_secs(secs), m_error(no_error)
    {}
- int m_id;
- int m_value;
- int m_secs;
+ int m_id;
+ int m_value;
+ int m_secs;
+ error_code_t m_error;
 };
 
 static int shared_val = 0;

Modified: trunk/libs/interprocess/test/vector_test.hpp
==============================================================================
--- trunk/libs/interprocess/test/vector_test.hpp (original)
+++ trunk/libs/interprocess/test/vector_test.hpp 2011-08-27 04:31:23 EDT (Sat, 27 Aug 2011)
@@ -35,14 +35,14 @@
 namespace test{
 
 template<class V1, class V2>
-bool copyable_only(V1 *, V2 *, boost::interprocess::detail::false_type)
+bool copyable_only(V1 *, V2 *, boost::interprocess::ipcdetail::false_type)
 {
    return true;
 }
 
 //Function to check if both sets are equal
 template<class V1, class V2>
-bool copyable_only(V1 *shmvector, V2 *stdvector, boost::interprocess::detail::true_type)
+bool copyable_only(V1 *shmvector, V2 *stdvector, boost::interprocess::ipcdetail::true_type)
 {
    typedef typename V1::value_type IntType;
    std::size_t size = shmvector->size();
@@ -137,7 +137,7 @@
             IntType aux_vect[50];
             for(int i = 0; i < 50; ++i){
                IntType new_int(-1);
- //BOOST_STATIC_ASSERT((::boost::move_detail::is_copy_constructible<boost::interprocess::test::movable_int>::value == false));
+ //BOOST_STATIC_ASSERT((::boost::move_ipcdetail::is_copy_constructible<boost::interprocess::test::movable_int>::value == false));
                aux_vect[i] = boost::interprocess::move(new_int);
             }
             int aux_vect2[50];
@@ -186,7 +186,7 @@
          if(!test::CheckEqualContainers(shmvector, stdvector)) return 1;
 
          if(!copyable_only(shmvector, stdvector
- ,detail::bool_<!detail::is_same<IntType, test::movable_int>::value>())){
+ ,ipcdetail::bool_<!ipcdetail::is_same<IntType, test::movable_int>::value>())){
             return 1;
          }
 

Modified: trunk/libs/interprocess/test/windows_shared_memory_test.cpp
==============================================================================
--- trunk/libs/interprocess/test/windows_shared_memory_test.cpp (original)
+++ trunk/libs/interprocess/test/windows_shared_memory_test.cpp 2011-08-27 04:31:23 EDT (Sat, 27 Aug 2011)
@@ -32,7 +32,7 @@
 }
 
 static const std::size_t ShmSize = 1000;
-typedef detail::managed_open_or_create_impl
+typedef ipcdetail::managed_open_or_create_impl
    <windows_shared_memory, false> windows_shared_memory_t;
 
 //This wrapper is necessary to have a common constructor

Modified: trunk/libs/interprocess/test/xsi_shared_memory_mapping_test.cpp
==============================================================================
--- trunk/libs/interprocess/test/xsi_shared_memory_mapping_test.cpp (original)
+++ trunk/libs/interprocess/test/xsi_shared_memory_mapping_test.cpp 2011-08-27 04:31:23 EDT (Sat, 27 Aug 2011)
@@ -52,7 +52,7 @@
 
 inline std::string get_filename()
 {
- std::string ret (detail::get_temporary_path());
+ std::string ret (ipcdetail::get_temporary_path());
    ret += "/";
    ret += test::get_process_id_name();
    return ret;
@@ -64,7 +64,7 @@
    const char *names[2] = { filename.c_str(), 0 };
 
    file_mapping::remove(names[0]);
- { detail::file_wrapper(create_only, names[0], read_write); }
+ { ipcdetail::file_wrapper(create_only, names[0], read_write); }
    xsi_key key(names[0], 1);
    file_mapping::remove(names[0]);
    remove_shared_memory(key);


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