From 3690d33f371feabdbcd1df3a6b2d3ce6c60797f9 Mon Sep 17 00:00:00 2001 From: Tobias Schuele Date: Mon, 9 Nov 2015 18:09:46 +0100 Subject: [PATCH] Fixed minor language issues. --- containers_cpp/include/embb/containers/internal/hazard_pointer-inl.h | 2 +- containers_cpp/include/embb/containers/internal/hazard_pointer.h | 16 ++++++++-------- containers_cpp/include/embb/containers/lock_free_tree_value_pool.h | 6 +++--- containers_cpp/include/embb/containers/object_pool.h | 2 +- containers_cpp/include/embb/containers/wait_free_array_value_pool.h | 16 ++++++++-------- 5 files changed, 21 insertions(+), 21 deletions(-) diff --git a/containers_cpp/include/embb/containers/internal/hazard_pointer-inl.h b/containers_cpp/include/embb/containers/internal/hazard_pointer-inl.h index 83f80aa..97a020f 100644 --- a/containers_cpp/include/embb/containers/internal/hazard_pointer-inl.h +++ b/containers_cpp/include/embb/containers/internal/hazard_pointer-inl.h @@ -30,7 +30,7 @@ namespace embb { namespace containers { namespace internal { -// Visual Studio is complaining, that the return in the last line of this +// Visual Studio is complaining that the return in the last line of this // function is not reachable. This is true, as long as exceptions are enabled. // Otherwise, the exception becomes an assertion and with disabling assertions, // the code becomes reachable. So, disabling this warning. diff --git a/containers_cpp/include/embb/containers/internal/hazard_pointer.h b/containers_cpp/include/embb/containers/internal/hazard_pointer.h index 2a25b67..32bcc7f 100644 --- a/containers_cpp/include/embb/containers/internal/hazard_pointer.h +++ b/containers_cpp/include/embb/containers/internal/hazard_pointer.h @@ -96,10 +96,10 @@ namespace internal { * Also in contrast to the original implementation, we do not provide a HelpScan * functionality, which gives threads the possibility, to not participate in the * garbage collection anymore: other threads will help to clean-up the objects - * protected by the exiting thread. The reason is, that the only use-case would + * protected by the exiting thread. The reason is that the only use-case would * be a crashing thread, not participating anymore. However, as the thread has - * to signal its exit himself, this is not possible to realize anyways. In the - * end, it is still guaranteed that all memory is properly returned (in the + * to signal its exit himself, this is not possible to realize. In the end, + * it is still guaranteed that all memory is properly returned (in the * destructor). * * Additionally, the original implementation holds a threshold, which determines @@ -116,7 +116,7 @@ class HazardPointer { public: /** * The user of the hazard pointer class has to provide the memory that is - * managed here. The user has to take into account, that releasing of memory + * managed here. The user has to take into account that releasing of memory * might be delayed. He has therefore to provide more memory than he wants to * guarantee at each point in time. More specific, on top of the guaranteed * count of objects, he has to provide the additional count of objects that @@ -178,7 +178,7 @@ class HazardPointer { /** * Guards \c to_guard. If the guarded_element is passed to \c EnqueueForDeletion - * it is prevented from release from now on. The user must have a check, that + * it is prevented from release from now on. The user must have a check that * EnqueueForDeletion has not been called on to_guard, before the guarding took * effect. * @@ -244,7 +244,7 @@ class HazardPointer { /** * Mapping from EMBB thread id to hazard pointer thread ids. Hazard pointer - * thread ids are in range [0;accesor_count-1]. The position of a EMBB thread + * thread ids are in the range [0;accesor_count-1]. The position of a EMBB thread * id in that array determines the respective hazard pointer thread id. */ embb::base::Atomic* thread_id_mapping_; @@ -262,8 +262,8 @@ class HazardPointer { /** * A list of lists, represented as single array. Each thread maintains a list - * of retired pointers, that are objects that are logically released but not - * released because some thread placed a guard on it. + * of retired pointers that are objects logically released but not released + * because some thread placed a guard on it. */ GuardType* thread_local_retired_lists_; diff --git a/containers_cpp/include/embb/containers/lock_free_tree_value_pool.h b/containers_cpp/include/embb/containers/lock_free_tree_value_pool.h index 0709586..7dd93e1 100644 --- a/containers_cpp/include/embb/containers/lock_free_tree_value_pool.h +++ b/containers_cpp/include/embb/containers/lock_free_tree_value_pool.h @@ -283,14 +283,14 @@ class LockFreeTreeValuePool { /** * Due to concurrency effects, a pool might provide less elements than managed * by it. However, usually one wants to guarantee a minimal capacity. The - * count of elements that must be given to the pool when to guarantee \c + * number of elements that must be given to the pool to guarantee \c * capacity elements is computed using this function. * - * \return count of indices the pool has to be initialized with + * \return number of indices the pool has to be initialized with */ static size_t GetMinimumElementCountForGuaranteedCapacity( size_t capacity - /**< [IN] count of indices that shall be guaranteed */); + /**< [IN] number of indices that shall be guaranteed */); /** * Destructs the pool. diff --git a/containers_cpp/include/embb/containers/object_pool.h b/containers_cpp/include/embb/containers/object_pool.h index abc56f7..99d20ba 100644 --- a/containers_cpp/include/embb/containers/object_pool.h +++ b/containers_cpp/include/embb/containers/object_pool.h @@ -71,7 +71,7 @@ class ObjectPool { /** * The size of the underlying value pool. This is also the size of the object * array in this class. It is assumed that the valuepool manages indices in - * range [0;value_pool_size_-1]. + * the range [0;value_pool_size_-1]. */ size_t value_pool_size_; diff --git a/containers_cpp/include/embb/containers/wait_free_array_value_pool.h b/containers_cpp/include/embb/containers/wait_free_array_value_pool.h index c148936..e744812 100644 --- a/containers_cpp/include/embb/containers/wait_free_array_value_pool.h +++ b/containers_cpp/include/embb/containers/wait_free_array_value_pool.h @@ -50,19 +50,19 @@ namespace containers { * to the pool. To guarantee linearizability, \c element is not allowed to be * modified between \c Allocate and \c Free. It is only allowed to free elements * that have previously been allocated. The \c Allocate function does not - * guarantee an order on which indices are allocated. The number of elements + * guarantee an order in which indices are allocated. The number of elements * that can be allocated with \c Allocate might be smaller than the number of - * elements, the pool is initialized with. This might be because of - * implementation details and respective concurrency effects: for example, if + * elements the pool is initialized with. This might be because of + * implementation details and respective concurrency effects: For example, if * indices are managed within a queue, one has to protect queue elements from * concurrency effects (reuse and access). As long as a thread potentially * accesses a node (and with that an index), the respective index cannot not be * given out to the user, even if being logically not part of the pool anymore. * However, the user might want to guarantee the required capacity. * For that purpose, the static \c GetMinimumElementCountForGuaranteedCapacity method - * is used. The user passes the number of indices to this method, that shall be - * guaranteed by the pool. The method returns the number on indices, the pool - * has to be initialized with in order to guarantee this number on indices. + * is used. The user passes the number of indices that shall be guaranteed by the + * pool to this method. The method returns the number of indices the pool + * has to be initialized with in order to guarantee this number of indices. * * \par Requirements * - Let \c Pool be the pool class @@ -117,7 +117,7 @@ namespace containers { * \code{.cpp} GetMinimumElementCountForGuaranteedCapacity(f) * \endcode * \c void - * Static method, returns the number of indices, the user has to + * Static method, returns the number of indices the user has to * initialize the pool with in order to guarantee a capacity of \c f elements * (irrespective of concurrency effects). * @@ -181,7 +181,7 @@ class WaitFreeArrayValuePool { /** * Due to concurrency effects, a pool might provide less elements than managed * by it. However, usually one wants to guarantee a minimal capacity. The - * number of elements that must be given to the pool when to guarantee \c + * number of elements that must be given to the pool to guarantee \c * capacity elements is computed using this function. * * \return number of indices the pool has to be initialized with -- libgit2 0.26.0