Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
FORMUS3IC_LAS3
/
embb
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
3690d33f
authored
Nov 09, 2015
by
Tobias Schuele
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed minor language issues.
parent
9a558cea
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
21 additions
and
21 deletions
+21
-21
containers_cpp/include/embb/containers/internal/hazard_pointer-inl.h
+1
-1
containers_cpp/include/embb/containers/internal/hazard_pointer.h
+8
-8
containers_cpp/include/embb/containers/lock_free_tree_value_pool.h
+3
-3
containers_cpp/include/embb/containers/object_pool.h
+1
-1
containers_cpp/include/embb/containers/wait_free_array_value_pool.h
+8
-8
No files found.
containers_cpp/include/embb/containers/internal/hazard_pointer-inl.h
View file @
3690d33f
...
@@ -30,7 +30,7 @@
...
@@ -30,7 +30,7 @@
namespace
embb
{
namespace
embb
{
namespace
containers
{
namespace
containers
{
namespace
internal
{
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.
// function is not reachable. This is true, as long as exceptions are enabled.
// Otherwise, the exception becomes an assertion and with disabling assertions,
// Otherwise, the exception becomes an assertion and with disabling assertions,
// the code becomes reachable. So, disabling this warning.
// the code becomes reachable. So, disabling this warning.
...
...
containers_cpp/include/embb/containers/internal/hazard_pointer.h
View file @
3690d33f
...
@@ -96,10 +96,10 @@ namespace internal {
...
@@ -96,10 +96,10 @@ namespace internal {
* Also in contrast to the original implementation, we do not provide a HelpScan
* Also in contrast to the original implementation, we do not provide a HelpScan
* functionality, which gives threads the possibility, to not participate in the
* functionality, which gives threads the possibility, to not participate in the
* garbage collection anymore: other threads will help to clean-up the objects
* 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
* 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
* to signal its exit himself, this is not possible to realize
. In the end,
*
end,
it is still guaranteed that all memory is properly returned (in the
* it is still guaranteed that all memory is properly returned (in the
* destructor).
* destructor).
*
*
* Additionally, the original implementation holds a threshold, which determines
* Additionally, the original implementation holds a threshold, which determines
...
@@ -116,7 +116,7 @@ class HazardPointer {
...
@@ -116,7 +116,7 @@ class HazardPointer {
public
:
public
:
/**
/**
* The user of the hazard pointer class has to provide the memory that is
* 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
* 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
* 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
* count of objects, he has to provide the additional count of objects that
...
@@ -178,7 +178,7 @@ class HazardPointer {
...
@@ -178,7 +178,7 @@ class HazardPointer {
/**
/**
* Guards \c to_guard. If the guarded_element is passed to \c EnqueueForDeletion
* 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
* EnqueueForDeletion has not been called on to_guard, before the guarding took
* effect.
* effect.
*
*
...
@@ -244,7 +244,7 @@ class HazardPointer {
...
@@ -244,7 +244,7 @@ class HazardPointer {
/**
/**
* Mapping from EMBB thread id to hazard pointer thread ids. Hazard pointer
* 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.
* id in that array determines the respective hazard pointer thread id.
*/
*/
embb
::
base
::
Atomic
<
int
>*
thread_id_mapping_
;
embb
::
base
::
Atomic
<
int
>*
thread_id_mapping_
;
...
@@ -262,8 +262,8 @@ class HazardPointer {
...
@@ -262,8 +262,8 @@ class HazardPointer {
/**
/**
* A list of lists, represented as single array. Each thread maintains a list
* 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
* of retired pointers
that are objects logically released but not released
*
released
because some thread placed a guard on it.
* because some thread placed a guard on it.
*/
*/
GuardType
*
thread_local_retired_lists_
;
GuardType
*
thread_local_retired_lists_
;
...
...
containers_cpp/include/embb/containers/lock_free_tree_value_pool.h
View file @
3690d33f
...
@@ -283,14 +283,14 @@ class LockFreeTreeValuePool {
...
@@ -283,14 +283,14 @@ class LockFreeTreeValuePool {
/**
/**
* Due to concurrency effects, a pool might provide less elements than managed
* Due to concurrency effects, a pool might provide less elements than managed
* by it. However, usually one wants to guarantee a minimal capacity. The
* 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.
* 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
(
static
size_t
GetMinimumElementCountForGuaranteedCapacity
(
size_t
capacity
size_t
capacity
/**< [IN]
count
of indices that shall be guaranteed */
);
/**< [IN]
number
of indices that shall be guaranteed */
);
/**
/**
* Destructs the pool.
* Destructs the pool.
...
...
containers_cpp/include/embb/containers/object_pool.h
View file @
3690d33f
...
@@ -71,7 +71,7 @@ class ObjectPool {
...
@@ -71,7 +71,7 @@ class ObjectPool {
/**
/**
* The size of the underlying value pool. This is also the size of the object
* 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
* 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_
;
size_t
value_pool_size_
;
...
...
containers_cpp/include/embb/containers/wait_free_array_value_pool.h
View file @
3690d33f
...
@@ -50,19 +50,19 @@ namespace containers {
...
@@ -50,19 +50,19 @@ namespace containers {
* to the pool. To guarantee linearizability, \c element is not allowed to be
* 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
* 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
* that have previously been allocated. The \c Allocate function does not
* guarantee an order
o
n which indices are allocated. The number of elements
* guarantee an order
i
n which indices are allocated. The number of elements
* that can be allocated with \c Allocate might be smaller than the number of
* 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
* elements the pool is initialized with. This might be because of
* implementation details and respective concurrency effects:
f
or example, if
* implementation details and respective concurrency effects:
F
or example, if
* indices are managed within a queue, one has to protect queue elements from
* indices are managed within a queue, one has to protect queue elements from
* concurrency effects (reuse and access). As long as a thread potentially
* 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
* 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.
* 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.
* However, the user might want to guarantee the required capacity.
* For that purpose, the static \c GetMinimumElementCountForGuaranteedCapacity method
* For that purpose, the static \c GetMinimumElementCountForGuaranteedCapacity method
* is used. The user passes the number of indices t
o this method, that shall b
e
* is used. The user passes the number of indices t
hat shall be guaranteed by th
e
*
guaranteed by the pool. The method returns the number on indices,
the pool
*
pool to this method. The method returns the number of indices
the pool
* has to be initialized with in order to guarantee this number o
n
indices.
* has to be initialized with in order to guarantee this number o
f
indices.
*
*
* \par Requirements
* \par Requirements
* - Let \c Pool be the pool class
* - Let \c Pool be the pool class
...
@@ -117,7 +117,7 @@ namespace containers {
...
@@ -117,7 +117,7 @@ namespace containers {
* <td>\code{.cpp} GetMinimumElementCountForGuaranteedCapacity(f)
* <td>\code{.cpp} GetMinimumElementCountForGuaranteedCapacity(f)
* \endcode</td>
* \endcode</td>
* <td>\c void</td>
* <td>\c void</td>
* <td>Static method, returns the number of indices
,
the user has to
* <td>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
* initialize the pool with in order to guarantee a capacity of \c f elements
* (irrespective of concurrency effects).
* (irrespective of concurrency effects).
* </td>
* </td>
...
@@ -181,7 +181,7 @@ class WaitFreeArrayValuePool {
...
@@ -181,7 +181,7 @@ class WaitFreeArrayValuePool {
/**
/**
* Due to concurrency effects, a pool might provide less elements than managed
* Due to concurrency effects, a pool might provide less elements than managed
* by it. However, usually one wants to guarantee a minimal capacity. The
* 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.
* capacity elements is computed using this function.
*
*
* \return number of indices the pool has to be initialized with
* \return number of indices the pool has to be initialized with
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment