Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r70839 - in trunk/libs: interprocess/doc intrusive/doc intrusive/example
From: igaztanaga_at_[hidden]
Date: 2011-04-01 18:04:18


Author: igaztanaga
Date: 2011-04-01 18:04:17 EDT (Fri, 01 Apr 2011)
New Revision: 70839
URL: http://svn.boost.org/trac/boost/changeset/70839

Log:
Fixes for Boost 1.47
Text files modified:
   trunk/libs/interprocess/doc/interprocess.qbk | 26 +++++++++++++++++++++-----
   trunk/libs/intrusive/doc/intrusive.qbk | 5 ++++-
   trunk/libs/intrusive/example/doc_offset_ptr.cpp | 10 ++++++----
   3 files changed, 31 insertions(+), 10 deletions(-)

Modified: trunk/libs/interprocess/doc/interprocess.qbk
==============================================================================
--- trunk/libs/interprocess/doc/interprocess.qbk (original)
+++ trunk/libs/interprocess/doc/interprocess.qbk 2011-04-01 18:04:17 EDT (Fri, 01 Apr 2011)
@@ -2777,8 +2777,8 @@
 
 [section:file_lock_careful_iostream Be Careful With Iostream Writing]
 
-As we've seen file locking can be useful to synchronize two processes
-reading and writing to a file, but [*make sure data is written to the file]
+As we've seen file locking can be useful to synchronize two processes,
+but [*make sure data is written to the file]
 before unlocking the file lock. Take in care that iostream classes do some
 kind of buffering, so if you want to make sure that other processes can
 see the data you've written, you have the following alternatives:
@@ -2787,7 +2787,8 @@
    in Windows systems) instead of iostream.
 
 * Flush data before unlocking the file lock in writers using `fflush` if you are using
- standard C functions or the `flush()` member function when using C++ iostreams.
+ standard C functions or the `flush()` member function when using C++ iostreams. In windows
+ you can't even use another class to access the same file.
 
    //...
 
@@ -2796,7 +2797,7 @@
    // ...
    //Open the file lock
    fstream file("my_file")
- file_lock f_lock("my_file");
+ file_lock f_lock("my_lock_file");
 
    {
       scoped_lock<file_lock> e_lock(f_lock);
@@ -6604,7 +6605,22 @@
 [section:release_notes_boost_1_47_00 Boost 1.47 Release]
 
 * Fixed bugs
- [@https://svn.boost.org/trac/boost/ticket/5197 #5197].
+ [@https://svn.boost.org/trac/boost/ticket/2796 #2796],
+ [@https://svn.boost.org/trac/boost/ticket/4031 #4031],
+ [@https://svn.boost.org/trac/boost/ticket/4251 #4251],
+ [@https://svn.boost.org/trac/boost/ticket/4452 #4452],
+ [@https://svn.boost.org/trac/boost/ticket/4895 #4895],
+ [@https://svn.boost.org/trac/boost/ticket/5077 #5077],
+ [@https://svn.boost.org/trac/boost/ticket/5120 #5120],
+ [@https://svn.boost.org/trac/boost/ticket/5123 #5123],
+ [@https://svn.boost.org/trac/boost/ticket/5230 #5230],
+ [@https://svn.boost.org/trac/boost/ticket/5197 #5197],
+ [@https://svn.boost.org/trac/boost/ticket/5287 #5287],
+ [@https://svn.boost.org/trac/boost/ticket/5294 #5294],
+ [@https://svn.boost.org/trac/boost/ticket/5306 #5306],
+ [@https://svn.boost.org/trac/boost/ticket/5308 #5308],
+ [@https://svn.boost.org/trac/boost/ticket/5392 #5392],
+ [@https://svn.boost.org/trac/boost/ticket/5409 #5409],
 
 * Added support to customize offset_ptr and allow
   creating custom managed segments that might be shared between

Modified: trunk/libs/intrusive/doc/intrusive.qbk
==============================================================================
--- trunk/libs/intrusive/doc/intrusive.qbk (original)
+++ trunk/libs/intrusive/doc/intrusive.qbk 2011-04-01 18:04:17 EDT (Fri, 01 Apr 2011)
@@ -3833,8 +3833,11 @@
 
 [section:release_notes_boost_1_47_00 Boost 1.47 Release]
 
-* Fixed bug
+* Fixed bugs
+ [@https://svn.boost.org/trac/boost/ticket/4797 #4797],
+ [@https://svn.boost.org/trac/boost/ticket/5165 #5165],
   [@https://svn.boost.org/trac/boost/ticket/5183 #5183],
+ [@https://svn.boost.org/trac/boost/ticket/5191 #5191].
 
 [endsect]
 

Modified: trunk/libs/intrusive/example/doc_offset_ptr.cpp
==============================================================================
--- trunk/libs/intrusive/example/doc_offset_ptr.cpp (original)
+++ trunk/libs/intrusive/example/doc_offset_ptr.cpp 2011-04-01 18:04:17 EDT (Fri, 01 Apr 2011)
@@ -1,6 +1,6 @@
 /////////////////////////////////////////////////////////////////////////////
 //
-// (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
@@ -51,7 +51,7 @@
 #include <boost/interprocess/allocators/allocator.hpp>
 
 //Definition of the shared memory friendly intrusive list
-typedef ip::list<shared_memory_data> shm_list_t;
+typedef list<shared_memory_data> intrusive_list_t;
 
 int main()
 {
@@ -80,12 +80,14 @@
       for(int i = 0; i < MaxElem; ++i) (*pshm_vect)[i].set(i);
 
       //Now create the shared memory intrusive list
- shm_list_t *plist = shm.construct<shm_list_t>(ip::anonymous_instance)();
+ intrusive_list_t *plist = shm.construct<intrusive_list_t>(ip::anonymous_instance)();
+
+ //Insert objects stored in shared memory vector in the intrusive list
       plist->insert(plist->end(), pshm_vect->begin(), pshm_vect->end());
 
       //Check all the inserted nodes
       int checker = 0;
- for( shm_list_t::const_iterator it = plist->begin(), itend(plist->end())
+ for( intrusive_list_t::const_iterator it = plist->begin(), itend(plist->end())
          ; it != itend; ++it, ++checker){
          if(it->get() != checker) return false;
       }


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