Commit 073c40b7 by Christian Kern

Remove warnings (gcc):

- shift initialization of is_active to correct position
- remove unused variable
parent 753e386f
......@@ -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()];
}
......
......@@ -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> >);
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment