Commit 41af80bb by Marcus Winter

fixed cpplint warnings

parent acdffd5a
......@@ -53,5 +53,5 @@
#endif //DOXYGEN
#endif //EMBB_BASE_C_INTERNAL_ATOMIC_INIT_H_
#endif //EMBB_BASE_C_INTERNAL_ATOMIC_DESTROY_H_
......@@ -44,14 +44,16 @@ static EMBB_BASE_BASIC_TYPE_SIZE_4 embb_max_number_thread_indices_flag = 0;
unsigned int* embb_max_number_thread_indices() {
EMBB_BASE_BASIC_TYPE_SIZE_4 compare_to = 0;
if (embb_internal__atomic_load_4(&embb_max_number_thread_indices_flag) != 2) {
if (embb_internal__atomic_load_4(
&embb_max_number_thread_indices_flag) != 2) {
if (embb_internal__atomic_compare_and_swap_4(
&embb_max_number_thread_indices_flag, &compare_to, 1)) {
embb_max_number_thread_indices_max =
(int)(embb_core_count_available() * 2);
embb_internal__atomic_store_4(&embb_max_number_thread_indices_flag, 2);
}
while (embb_internal__atomic_load_4(&embb_max_number_thread_indices_flag) != 2) {}
while (embb_internal__atomic_load_4(
&embb_max_number_thread_indices_flag) != 2) {}
}
return (unsigned int*) &embb_max_number_thread_indices_max;
}
......@@ -71,7 +73,8 @@ embb_counter_t* embb_thread_index_counter() {
embb_counter_init(&embb_thread_index_counter_index);
embb_internal__atomic_store_4(&embb_thread_index_counter_flag, 2);
}
while (embb_internal__atomic_load_4(&embb_thread_index_counter_flag) != 2) {}
while (embb_internal__atomic_load_4(
&embb_thread_index_counter_flag) != 2) {}
}
return &embb_thread_index_counter_index;
}
......
......@@ -39,7 +39,6 @@
#include <embb/containers/object_pool.h>
#include <embb/containers/lock_free_stack.h>
#include <embb/containers/lock_free_mpmc_queue.h>
#include <embb/base/c/memory_allocation.h>
#include <embb/base/c/atomic.h>
#ifdef EMBB_PLATFORM_COMPILER_MSVC
......
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