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
073c40b7
authored
Oct 07, 2014
by
Christian Kern
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove warnings (gcc):
- shift initialization of is_active to correct position - remove unused variable
parent
753e386f
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
12 deletions
+11
-12
containers_cpp/include/embb/containers/internal/hazard_pointer-inl.h
+2
-5
containers_cpp/test/main.cc
+9
-7
No files found.
containers_cpp/include/embb/containers/internal/hazard_pointer-inl.h
View file @
073c40b7
...
...
@@ -150,14 +150,14 @@ HazardPointerThreadEntry(GuardType undefined_guard, int guards_per_thread,
undefined_guard
(
undefined_guard
),
guards_per_thread
(
guards_per_thread
),
max_size_retired_list
(
max_size_retired_list
),
retired_list
(
max_size_retired_list
),
retired_list_temp
(
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
// progress.
// Still, threads can be leave the hazard pointer processing (deactivation),
// but this can only be done once, i.e., this is not revertable...
is_active
(
1
),
retired_list
(
max_size_retired_list
),
retired_list_temp
(
max_size_retired_list
),
hazard_pointer_list_temp
(
embb
::
base
::
Thread
::
GetThreadsMaxCount
()
*
guards_per_thread
)
{
// Initialize guarded pointer list
...
...
@@ -240,9 +240,6 @@ HazardPointer< GuardType >::GetHazardPointerElementForCurrentThread() {
// stop operating, and the others are responsible for his retired
// list.
HazardPointerThreadEntry_t
*
current_thread_entry
=
&
hazard_pointer_thread_entry_array
[
GetCurrentThreadIndex
()];
return
hazard_pointer_thread_entry_array
[
GetCurrentThreadIndex
()];
}
...
...
containers_cpp/test/main.cc
View file @
073c40b7
...
...
@@ -45,19 +45,20 @@ PT_MAIN("Data Structures C++") {
unsigned
int
max_threads
=
static_cast
<
unsigned
int
>
(
2
*
partest
::
TestSuite
::
GetDefaultNumThreads
());
embb_thread_set_max_count
(
max_threads
);
PT_RUN
(
embb
::
containers
::
test
::
PoolTest
<
embb
::
containers
::
WaitFreeArrayValuePool
<
int
COMMA
-
1
>
>
);
PT_RUN
(
embb
::
containers
::
test
::
PoolTest
<
embb
::
containers
::
LockFreeTreeValuePool
<
int
COMMA
-
1
>
>
);
for
(;;)
{
PT_RUN
(
embb
::
containers
::
test
::
PoolTest
<
embb
::
containers
::
WaitFreeArrayValuePool
<
int
COMMA
-
1
>
>
);
PT_RUN
(
embb
::
containers
::
test
::
PoolTest
<
embb
::
containers
::
LockFreeTreeValuePool
<
int
COMMA
-
1
>
>
);
PT_RUN
(
embb
::
containers
::
test
::
HazardPointerTest
);
PT_RUN
(
embb
::
containers
::
test
::
QueueTest
<
embb
::
containers
::
WaitFreeSPSCQueue
<
int
>
>
);
PT_RUN
(
embb
::
containers
::
test
::
QueueTest
<
embb
::
containers
::
LockFreeMPMCQueue
<
int
>
COMMA
true
COMMA
true
>
);
PT_RUN
(
embb
::
containers
::
test
::
QueueTest
<
embb
::
containers
::
LockFreeMPMCQueue
<
int
>
COMMA
true
COMMA
true
>
);
PT_RUN
(
embb
::
containers
::
test
::
StackTest
<
embb
::
containers
::
LockFreeStack
<
int
>
>
);
...
...
@@ -67,4 +68,5 @@ PT_MAIN("Data Structures C++") {
PT_RUN
(
embb
::
containers
::
test
::
ObjectPoolTest
<
embb
::
containers
::
WaitFreeArrayValuePool
<
int
COMMA
0
>
>
);
}
}
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