Ticket #6952: 0001-Fix-mixed-comment-style-that-might-be-confusing-doc-.patch

File 0001-Fix-mixed-comment-style-that-might-be-confusing-doc-.patch, 19.8 KB (added by anthony.foiani@…, 10 years ago)

patch to fix mixed-style comments

  • boost/interprocess/detail/managed_memory_impl.hpp

    From d1c8283ccb240b277bea9e1be6b99fa2c25f6772 Mon Sep 17 00:00:00 2001
    From: Anthony Foiani <anthony.foiani@gmail.com>
    Date: Tue, 29 May 2012 09:26:57 -0600
    Subject: [PATCH] Fix mixed comment style that might be confusing doc
     generator.
    
    There are a handful of comments of the form:
    
      //! ... */
    
    In at least one instance (boost/interprocess/ipc/message_queue.hpp), the
    code looks like this:
    
       //!Sends a message stored in buffer "buffer" with size "buffer_size" in the
       //!message queue with priority "priority". If the message queue is full
       //!the sender is blocked. Throws interprocess_error on error.*/
       void send (const void *buffer,     size_type buffer_size,
                  unsigned int priority);
    
    Which got rendered into the docs like so:
    
       *void send(const void * buffer, size_type buffer_size, unsigned int priority);
    
       Sends a message stored in buffer "buffer" with size "buffer_size" in
       the message queue with priority "priority". If the message queue is
       full the sender is blocked. Throws interprocess_error on error.
    
       -- http://www.boost.org/doc/libs/1_49_0/doc/html/boost/interprocess/message_queue_t.html#id985430-bb
    
    Note the leading "*" on the method signature.
    
    Signed-Off-By: Anthony Foiani <anthony.foiani@gmail.com>
    ---
     boost/interprocess/detail/managed_memory_impl.hpp  |    8 ++++----
     boost/interprocess/indexes/iset_index.hpp          |    2 +-
     boost/interprocess/ipc/message_queue.hpp           |    4 ++--
     boost/interprocess/managed_external_buffer.hpp     |    2 +-
     boost/interprocess/managed_heap_memory.hpp         |    2 +-
     boost/interprocess/managed_shared_memory.hpp       |    2 +-
     boost/interprocess/managed_xsi_shared_memory.hpp   |    2 +-
     boost/interprocess/mem_algo/simple_seq_fit.hpp     |    2 +-
     boost/interprocess/segment_manager.hpp             |    2 +-
     boost/interprocess/shared_memory_object.hpp        |    2 +-
     boost/interprocess/sync/interprocess_semaphore.hpp |    2 +-
     .../sync/interprocess_upgradable_mutex.hpp         |    2 +-
     boost/interprocess/sync/named_condition.hpp        |    2 +-
     boost/interprocess/sync/scoped_lock.hpp            |    8 ++++----
     boost/interprocess/sync/sharable_lock.hpp          |    4 ++--
     boost/interprocess/sync/shm/named_condition.hpp    |    2 +-
     .../interprocess/sync/windows/named_condition.hpp  |    2 +-
     libs/container/test/heap_allocator_v1.hpp          |    2 +-
     libs/interprocess/doc/interprocess.qbk             |    2 +-
     libs/interprocess/test/allocator_v1.hpp            |    2 +-
     libs/interprocess/test/heap_allocator_v1.hpp       |    2 +-
     21 files changed, 29 insertions(+), 29 deletions(-)
    
    diff --git a/boost/interprocess/detail/managed_memory_impl.hpp b/boost/interprocess/detail/managed_memory_impl.hpp
    index f9ecb8a..0d10669 100644
    a b struct segment_manager_type  
    6060//!achieve this, this class uses the reserved space provided by the allocation
    6161//!algorithm to place a named_allocator_algo, who takes care of name mappings.
    6262//!The class can be customized with the char type used for object names
    63 //!and the memory allocation algorithm to be used.*/
     63//!and the memory allocation algorithm to be used.
    6464template <  class CharType
    6565         ,  class MemoryAlgorithm
    6666         ,  template<class IndexConfig> class IndexType
    class basic_managed_memory_impl  
    265265   }
    266266
    267267   //!Transforms previously obtained offset into an absolute address in the
    268    //!process space of the current process. Never throws.*/
     268   //!process space of the current process. Never throws.
    269269   void *    get_address_from_handle (handle_t offset) const
    270270   {  return reinterpret_cast<char*>(this->get_address()) + offset; }
    271271
    class basic_managed_memory_impl  
    483483   //!-> If T's constructor throws, the function throws that exception.
    484484   //!
    485485   //!Memory is freed automatically if T's constructor throws and
    486    //!destructors of created objects are called before freeing the memory.*/
     486   //!destructors of created objects are called before freeing the memory.
    487487   template <class T>
    488488   typename segment_manager::template construct_iter_proxy<T>::type
    489489      construct_it(char_ptr_holder_t name, std::nothrow_t nothrow)
    class basic_managed_memory_impl  
    506506   //!-> If T's constructor throws, the function throws that exception.
    507507   //!
    508508   //!Memory is freed automatically if T's constructor throws and
    509    //!destructors of created objects are called before freeing the memory.*/
     509   //!destructors of created objects are called before freeing the memory.
    510510   template <class T>
    511511   typename segment_manager::template construct_iter_proxy<T>::type
    512512      find_or_construct_it(char_ptr_holder_t name, std::nothrow_t nothrow)
  • boost/interprocess/indexes/iset_index.hpp

    diff --git a/boost/interprocess/indexes/iset_index.hpp b/boost/interprocess/indexes/iset_index.hpp
    index 8fc9146..175ccd7 100644
    a b struct iset_index_aux  
    5656
    5757//!Index type based in boost::intrusive::set.
    5858//!Just derives from boost::intrusive::set
    59 //!and defines the interface needed by managed memory segments*/
     59//!and defines the interface needed by managed memory segments
    6060template <class MapConfig>
    6161class iset_index
    6262   //Derive class from map specialization
  • boost/interprocess/ipc/message_queue.hpp

    diff --git a/boost/interprocess/ipc/message_queue.hpp b/boost/interprocess/ipc/message_queue.hpp
    index 67dd574..67512c0 100644
    a b class message_queue_t  
    9999
    100100   //!Sends a message stored in buffer "buffer" with size "buffer_size" in the
    101101   //!message queue with priority "priority". If the message queue is full
    102    //!the sender is blocked. Throws interprocess_error on error.*/
     102   //!the sender is blocked. Throws interprocess_error on error.
    103103   void send (const void *buffer,     size_type buffer_size,
    104104              unsigned int priority);
    105105
    class mq_hdr_t  
    269269   //!Constructor. This object must be constructed in the beginning of the
    270270   //!shared memory of the size returned by the function "get_mem_size".
    271271   //!This constructor initializes the needed resources and creates
    272    //!the internal structures like the priority index. This can throw.*/
     272   //!the internal structures like the priority index. This can throw.
    273273   mq_hdr_t(size_type max_num_msg, size_type max_msg_size)
    274274      : m_max_num_msg(max_num_msg),
    275275         m_max_msg_size(max_msg_size),
  • boost/interprocess/managed_external_buffer.hpp

    diff --git a/boost/interprocess/managed_external_buffer.hpp b/boost/interprocess/managed_external_buffer.hpp
    index e268e57..25d57fa 100644
    a b namespace interprocess {  
    3535
    3636//!A basic user memory named object creation class. Inherits all
    3737//!basic functionality from
    38 //!basic_managed_memory_impl<CharType, AllocationAlgorithm, IndexType>*/
     38//!basic_managed_memory_impl<CharType, AllocationAlgorithm, IndexType>
    3939template
    4040      <
    4141         class CharType,
  • boost/interprocess/managed_heap_memory.hpp

    diff --git a/boost/interprocess/managed_heap_memory.hpp b/boost/interprocess/managed_heap_memory.hpp
    index 8710785..1778585 100644
    a b namespace interprocess {  
    3636
    3737//!A basic heap memory named object creation class. Initializes the
    3838//!heap memory segment. Inherits all basic functionality from
    39 //!basic_managed_memory_impl<CharType, AllocationAlgorithm, IndexType>*/
     39//!basic_managed_memory_impl<CharType, AllocationAlgorithm, IndexType>
    4040template
    4141      <
    4242         class CharType,
  • boost/interprocess/managed_shared_memory.hpp

    diff --git a/boost/interprocess/managed_shared_memory.hpp b/boost/interprocess/managed_shared_memory.hpp
    index 4bed5b5..f673a6f 100644
    a b namespace interprocess {  
    3434
    3535//!A basic shared memory named object creation class. Initializes the
    3636//!shared memory segment. Inherits all basic functionality from
    37 //!basic_managed_memory_impl<CharType, AllocationAlgorithm, IndexType>*/
     37//!basic_managed_memory_impl<CharType, AllocationAlgorithm, IndexType>
    3838template
    3939      <
    4040         class CharType,
  • boost/interprocess/managed_xsi_shared_memory.hpp

    diff --git a/boost/interprocess/managed_xsi_shared_memory.hpp b/boost/interprocess/managed_xsi_shared_memory.hpp
    index dc909f6..f893ff3 100644
    a b namespace interprocess {  
    3838
    3939//!A basic X/Open System Interface (XSI) shared memory named object creation class. Initializes the
    4040//!shared memory segment. Inherits all basic functionality from
    41 //!basic_managed_memory_impl<CharType, AllocationAlgorithm, IndexType>*/
     41//!basic_managed_memory_impl<CharType, AllocationAlgorithm, IndexType>
    4242template
    4343      <
    4444         class CharType,
  • boost/interprocess/mem_algo/simple_seq_fit.hpp

    diff --git a/boost/interprocess/mem_algo/simple_seq_fit.hpp b/boost/interprocess/mem_algo/simple_seq_fit.hpp
    index 1085ca0..a4d4ab1 100644
    a b class simple_seq_fit  
    4343
    4444   //!Constructor. "size" is the total size of the managed memory segment,
    4545   //!"extra_hdr_bytes" indicates the extra bytes beginning in the sizeof(simple_seq_fit)
    46    //!offset that the allocator should not use at all.*/
     46   //!offset that the allocator should not use at all.
    4747   simple_seq_fit           (size_type size, size_type extra_hdr_bytes)
    4848      : base_t(size, extra_hdr_bytes){}
    4949};
  • boost/interprocess/segment_manager.hpp

    diff --git a/boost/interprocess/segment_manager.hpp b/boost/interprocess/segment_manager.hpp
    index 8680a95..1ad5a27 100644
    a b class segment_manager  
    499499
    500500   //!Calls object function blocking recursive interprocess_mutex and guarantees that
    501501   //!no new named_alloc or destroy will be executed by any process while
    502    //!executing the object function call*/
     502   //!executing the object function call
    503503   template <class Func>
    504504   void atomic_func(Func &f)
    505505   {  scoped_lock<rmutex> guard(m_header);  f();  }
  • boost/interprocess/shared_memory_object.hpp

    diff --git a/boost/interprocess/shared_memory_object.hpp b/boost/interprocess/shared_memory_object.hpp
    index f3bc7ba..b1a7261 100644
    a b class shared_memory_object  
    6161   shared_memory_object();
    6262
    6363   //!Creates a shared memory object with name "name" and mode "mode", with the access mode "mode"
    64    //!If the file previously exists, throws an error.*/
     64   //!If the file previously exists, throws an error.
    6565   shared_memory_object(create_only_t, const char *name, mode_t mode, const permissions &perm = permissions())
    6666   {  this->priv_open_or_create(ipcdetail::DoCreate, name, mode, perm);  }
    6767
  • boost/interprocess/sync/interprocess_semaphore.hpp

    diff --git a/boost/interprocess/sync/interprocess_semaphore.hpp b/boost/interprocess/sync/interprocess_semaphore.hpp
    index 2a2f34f..969f2b9 100644
    a b class interprocess_semaphore  
    5656   /// @endcond
    5757   public:
    5858   //!Creates a interprocess_semaphore with the given initial count.
    59    //!interprocess_exception if there is an error.*/
     59   //!interprocess_exception if there is an error.
    6060   interprocess_semaphore(unsigned int initialCount);
    6161
    6262   //!Destroys the interprocess_semaphore.
  • boost/interprocess/sync/interprocess_upgradable_mutex.hpp

    diff --git a/boost/interprocess/sync/interprocess_upgradable_mutex.hpp b/boost/interprocess/sync/interprocess_upgradable_mutex.hpp
    index 8d5a452..2785eea 100644
    a b class interprocess_upgradable_mutex  
    176176   //!   fail if there are threads with sharable ownership or timeout reaches, but it
    177177   //!   will maintain upgradable ownership.
    178178   //!Returns: If acquires exclusive ownership, returns true. Otherwise returns false.
    179    //!Throws: An exception derived from interprocess_exception on error. */
     179   //!Throws: An exception derived from interprocess_exception on error.
    180180   bool timed_unlock_upgradable_and_lock(const boost::posix_time::ptime &abs_time);
    181181
    182182   //!Precondition: The thread must have sharable ownership of the mutex.
  • boost/interprocess/sync/named_condition.hpp

    diff --git a/boost/interprocess/sync/named_condition.hpp b/boost/interprocess/sync/named_condition.hpp
    index ca0205a..9e7848c 100644
    a b class named_condition  
    7777   ~named_condition();
    7878
    7979   //!If there is a thread waiting on *this, change that
    80    //!thread's state to ready. Otherwise there is no effect.*/
     80   //!thread's state to ready. Otherwise there is no effect.
    8181   void notify_one();
    8282
    8383   //!Change the state of all threads waiting on *this to ready.
  • boost/interprocess/sync/scoped_lock.hpp

    diff --git a/boost/interprocess/sync/scoped_lock.hpp b/boost/interprocess/sync/scoped_lock.hpp
    index 61fe93e..7fb68c3 100644
    a b class scoped_lock  
    245245   }
    246246
    247247   //!Effects: if (owns()) mp_mutex->unlock().
    248    //!Notes: The destructor behavior ensures that the mutex lock is not leaked.*/
     248   //!Notes: The destructor behavior ensures that the mutex lock is not leaked.
    249249   ~scoped_lock()
    250250   {
    251251      try{  if(m_locked && mp_mutex)   mp_mutex->unlock();  }
    class scoped_lock  
    286286   //!Notes: The scoped_lock changes from a state of not owning the mutex, to
    287287   //!   owning the mutex, but only if blocking was not required. If the
    288288   //!   mutex_type does not support try_lock(), this function will fail at
    289    //!   compile time if instantiated, but otherwise have no effect.*/
     289   //!   compile time if instantiated, but otherwise have no effect.
    290290   bool try_lock()
    291291   {
    292292      if(!mp_mutex || m_locked)
    class scoped_lock  
    301301   //!Notes: The scoped_lock changes from a state of not owning the mutex, to
    302302   //!   owning the mutex, but only if it can obtain ownership by the specified
    303303   //!   time. If the mutex_type does not support timed_lock (), this function
    304    //!   will fail at compile time if instantiated, but otherwise have no effect.*/
     304   //!   will fail at compile time if instantiated, but otherwise have no effect.
    305305   bool timed_lock(const boost::posix_time::ptime& abs_time)
    306306   {
    307307      if(!mp_mutex || m_locked)
    class scoped_lock  
    314314   //!   exception. Calls unlock() on the referenced mutex.
    315315   //!Postconditions: owns() == false.
    316316   //!Notes: The scoped_lock changes from a state of owning the mutex, to not
    317    //!   owning the mutex.*/
     317   //!   owning the mutex.
    318318   void unlock()
    319319   {
    320320      if(!mp_mutex || !m_locked)
  • boost/interprocess/sync/sharable_lock.hpp

    diff --git a/boost/interprocess/sync/sharable_lock.hpp b/boost/interprocess/sync/sharable_lock.hpp
    index 9342e45..9b5cec8 100644
    a b namespace interprocess {  
    4545//!the Mutex does not supply, no harm is done. Mutex ownership can be shared among
    4646//!sharable_locks, and a single upgradable_lock. sharable_lock does not support
    4747//!copy semantics. But sharable_lock supports ownership transfer from an sharable_lock,
    48 //!upgradable_lock and scoped_lock via transfer_lock syntax.*/
     48//!upgradable_lock and scoped_lock via transfer_lock syntax.
    4949template <class SharableMutex>
    5050class sharable_lock
    5151{
    class sharable_lock  
    136136   //!Notes: If upgr is locked, this constructor will lock this sharable_lock while
    137137   //!   unlocking upgr. Only a moved sharable_lock's will match this
    138138   //!   signature. An non-moved upgradable_lock can be moved with the expression:
    139    //!   "boost::move(lock);".*/
     139   //!   "boost::move(lock);".
    140140   template<class T>
    141141   sharable_lock(BOOST_RV_REF(upgradable_lock<T>) upgr
    142142      , typename ipcdetail::enable_if< ipcdetail::is_same<T, SharableMutex> >::type * = 0)
  • boost/interprocess/sync/shm/named_condition.hpp

    diff --git a/boost/interprocess/sync/shm/named_condition.hpp b/boost/interprocess/sync/shm/named_condition.hpp
    index 9d7cd77..dee9c20 100644
    a b class shm_named_condition  
    8383   ~shm_named_condition();
    8484
    8585   //!If there is a thread waiting on *this, change that
    86    //!thread's state to ready. Otherwise there is no effect.*/
     86   //!thread's state to ready. Otherwise there is no effect.
    8787   void notify_one();
    8888
    8989   //!Change the state of all threads waiting on *this to ready.
  • boost/interprocess/sync/windows/named_condition.hpp

    diff --git a/boost/interprocess/sync/windows/named_condition.hpp b/boost/interprocess/sync/windows/named_condition.hpp
    index f718610..cb24672 100644
    a b class windows_named_condition  
    4949   ~windows_named_condition();
    5050
    5151   //!If there is a thread waiting on *this, change that
    52    //!thread's state to ready. Otherwise there is no effect.*/
     52   //!thread's state to ready. Otherwise there is no effect.
    5353   void notify_one();
    5454
    5555   //!Change the state of all threads waiting on *this to ready.
  • libs/container/test/heap_allocator_v1.hpp

    diff --git a/libs/container/test/heap_allocator_v1.hpp b/libs/container/test/heap_allocator_v1.hpp
    index 56fc1a2..9a04259 100644
    a b namespace test {  
    4141//!An STL compatible heap_allocator_v1 that uses a segment manager as
    4242//!memory source. The internal pointer type will of the same type (raw, smart) as
    4343//!"typename SegmentManager::void_pointer" type. This allows
    44 //!placing the heap_allocator_v1 in shared memory, memory mapped-files, etc...*/
     44//!placing the heap_allocator_v1 in shared memory, memory mapped-files, etc...
    4545template<class T, class SegmentManager>
    4646class heap_allocator_v1
    4747{
  • libs/interprocess/doc/interprocess.qbk

    diff --git a/libs/interprocess/doc/interprocess.qbk b/libs/interprocess/doc/interprocess.qbk
    index 73f9b48..dbcc985 100644
    a b defines the following types:  
    30883088   //!and offset_ptr as internal pointers) as memory allocation algorithm
    30893089   //!and the default index type as the index.
    30903090   //!This class allows the shared memory to be mapped in different base
    3091    //!in different processes*/
     3091   //!in different processes
    30923092   typedef basic_managed_shared_memory
    30933093      <char
    30943094      ,/*Default memory algorithm defining void * as void_pointer*/
  • libs/interprocess/test/allocator_v1.hpp

    diff --git a/libs/interprocess/test/allocator_v1.hpp b/libs/interprocess/test/allocator_v1.hpp
    index d833c26..292e318 100644
    a b namespace test {  
    4141//!An STL compatible allocator_v1 that uses a segment manager as
    4242//!memory source. The internal pointer type will of the same type (raw, smart) as
    4343//!"typename SegmentManager::void_pointer" type. This allows
    44 //!placing the allocator_v1 in shared memory, memory mapped-files, etc...*/
     44//!placing the allocator_v1 in shared memory, memory mapped-files, etc...
    4545template<class T, class SegmentManager>
    4646class allocator_v1
    4747{
  • libs/interprocess/test/heap_allocator_v1.hpp

    diff --git a/libs/interprocess/test/heap_allocator_v1.hpp b/libs/interprocess/test/heap_allocator_v1.hpp
    index d5b8bac..033ded0 100644
    a b namespace test {  
    4141//!An STL compatible heap_allocator_v1 that uses a segment manager as
    4242//!memory source. The internal pointer type will of the same type (raw, smart) as
    4343//!"typename SegmentManager::void_pointer" type. This allows
    44 //!placing the heap_allocator_v1 in shared memory, memory mapped-files, etc...*/
     44//!placing the heap_allocator_v1 in shared memory, memory mapped-files, etc...
    4545template<class T, class SegmentManager>
    4646class heap_allocator_v1
    4747{