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
63da4fe7
authored
Oct 09, 2014
by
Christian Kern
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix cpplint warnings
parent
03e4f890
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
9 deletions
+12
-9
containers_cpp/include/embb/containers/internal/hazard_pointer-inl.h
+2
-3
containers_cpp/include/embb/containers/internal/hazard_pointer.h
+7
-6
scripts/run_cpplint.sh
+3
-0
No files found.
containers_cpp/include/embb/containers/internal/hazard_pointer-inl.h
View file @
63da4fe7
...
...
@@ -151,7 +151,7 @@ HazardPointerThreadEntry(GuardType undefined_guard, int guards_per_thread,
guards_per_thread
(
guards_per_thread
),
max_size_retired_list
(
max_size_retired_list
),
// initially, each potential thread is active... if that is not the case
// another thread could call "HelpScan", and block this thread in making
// another thread could call "HelpScan", and block this thread in making
// progress.
// Still, threads can be leave the hazard pointer processing (deactivation),
// but this can only be done once, i.e., this is not revertable...
...
...
@@ -271,8 +271,7 @@ Scan(HazardPointerThreadEntry_t* currentHazardPointerEntry) {
// a bug... this assertions checks that
int
expected
=
-
1
;
if
(
!
currentHazardPointerEntry
->
GetScanningThread
().
CompareAndSwap
(
expected
,
static_cast
<
int
>
(
GetCurrentThreadIndex
())))
{
expected
,
static_cast
<
int
>
(
GetCurrentThreadIndex
())))
{
assert
(
false
);
}
#endif
...
...
containers_cpp/include/embb/containers/internal/hazard_pointer.h
View file @
63da4fe7
...
...
@@ -169,17 +169,18 @@ class FixedSizeList {
*/
template
<
typename
GuardType
>
class
HazardPointerThreadEntry
{
#ifdef EMBB_DEBUG
public
:
embb
::
base
::
Atomic
<
int
>&
GetScanningThread
()
{
public
:
embb
::
base
::
Atomic
<
int
>&
GetScanningThread
()
{
return
who_is_scanning
;
}
private
:
private
:
embb
::
base
::
Atomic
<
int
>
who_is_scanning
;
#endif
private
:
private
:
/**
* Value of the undefined guard (means that no guard is set).
*/
...
...
scripts/run_cpplint.sh
View file @
63da4fe7
...
...
@@ -110,6 +110,9 @@ do
if
[[
$file
==
*
atomic_arithmetic.h
]]
;
then
current_rules+
=
",-readability/function"
# All parameters should be named in a function
fi
if
[[
$file
==
*
object_pool-inl.h
]]
;
then
current_rules+
=
",-readability/function"
# All parameters should be named in a function (triggers error with clang if named...)
fi
for
filename
in
"
${
RAND_FILES
[@]
}
"
;
do
if
[[
$file
=
~
$filename
]]
;
then
current_rules+
=
",-runtime/threadsafe_fn"
# These tests are allowed to use the thread unsafe rand()
...
...
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