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
41af80bb
authored
Nov 08, 2016
by
Marcus Winter
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed cpplint warnings
parent
acdffd5a
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
5 deletions
+7
-5
base_c/include/embb/base/c/internal/atomic/destroy.h
+1
-1
base_c/src/internal/thread_index.c
+6
-3
containers_cpp/test/main.cc
+0
-1
No files found.
base_c/include/embb/base/c/internal/atomic/destroy.h
View file @
41af80bb
...
@@ -53,5 +53,5 @@
...
@@ -53,5 +53,5 @@
#endif //DOXYGEN
#endif //DOXYGEN
#endif //EMBB_BASE_C_INTERNAL_ATOMIC_
INIT
_H_
#endif //EMBB_BASE_C_INTERNAL_ATOMIC_
DESTROY
_H_
base_c/src/internal/thread_index.c
View file @
41af80bb
...
@@ -44,14 +44,16 @@ static EMBB_BASE_BASIC_TYPE_SIZE_4 embb_max_number_thread_indices_flag = 0;
...
@@ -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
()
{
unsigned
int
*
embb_max_number_thread_indices
()
{
EMBB_BASE_BASIC_TYPE_SIZE_4
compare_to
=
0
;
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
(
if
(
embb_internal__atomic_compare_and_swap_4
(
&
embb_max_number_thread_indices_flag
,
&
compare_to
,
1
))
{
&
embb_max_number_thread_indices_flag
,
&
compare_to
,
1
))
{
embb_max_number_thread_indices_max
=
embb_max_number_thread_indices_max
=
(
int
)(
embb_core_count_available
()
*
2
);
(
int
)(
embb_core_count_available
()
*
2
);
embb_internal__atomic_store_4
(
&
embb_max_number_thread_indices_flag
,
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
;
return
(
unsigned
int
*
)
&
embb_max_number_thread_indices_max
;
}
}
...
@@ -71,7 +73,8 @@ embb_counter_t* embb_thread_index_counter() {
...
@@ -71,7 +73,8 @@ embb_counter_t* embb_thread_index_counter() {
embb_counter_init
(
&
embb_thread_index_counter_index
);
embb_counter_init
(
&
embb_thread_index_counter_index
);
embb_internal__atomic_store_4
(
&
embb_thread_index_counter_flag
,
2
);
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
;
return
&
embb_thread_index_counter_index
;
}
}
...
...
containers_cpp/test/main.cc
View file @
41af80bb
...
@@ -39,7 +39,6 @@
...
@@ -39,7 +39,6 @@
#include <embb/containers/object_pool.h>
#include <embb/containers/object_pool.h>
#include <embb/containers/lock_free_stack.h>
#include <embb/containers/lock_free_stack.h>
#include <embb/containers/lock_free_mpmc_queue.h>
#include <embb/containers/lock_free_mpmc_queue.h>
#include <embb/base/c/memory_allocation.h>
#include <embb/base/c/atomic.h>
#include <embb/base/c/atomic.h>
#ifdef EMBB_PLATFORM_COMPILER_MSVC
#ifdef EMBB_PLATFORM_COMPILER_MSVC
...
...
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