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
a7c7b027
authored
Nov 02, 2016
by
Marcus Winter
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixes for disabled threading analysis mode
parent
46d4d607
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
3 deletions
+18
-3
base_c/include/embb/base/c/atomic.h
+3
-1
base_c/include/embb/base/c/internal/atomic/atomic_variables.h
+14
-0
base_c/include/embb/base/c/internal/atomic/destroy.h
+0
-1
base_c/include/embb/base/c/internal/atomic/init.h
+1
-1
No files found.
base_c/include/embb/base/c/atomic.h
View file @
a7c7b027
...
...
@@ -321,6 +321,7 @@ void embb_mutex_destroy(
#define EMBB_ATOMIC_MUTEX_UNLOCK(mutex) embb_mutex_unlock(&(mutex))
#define EMBB_ATOMIC_MUTEX_DESTROY(mutex) embb_mutex_destroy(&(mutex))
#define EMBB_ATOMIC_INIT_CHECK(variable) assert(variable->marker == 0x12345678)
#define EMBB_ATOMIC_INIT_MARKER(variable) variable->marker = 0x12345678
#else
...
...
@@ -328,7 +329,8 @@ void embb_mutex_destroy(
#define EMBB_ATOMIC_MUTEX_LOCK(...)
#define EMBB_ATOMIC_MUTEX_UNLOCK(...)
#define EMBB_ATOMIC_MUTEX_DESTROY(...)
#define EMBB_ATOMIC_INIT_CHECK(...)
#define EMBB_ATOMIC_INIT_CHECK(variable) (void)(variable)
#define EMBB_ATOMIC_INIT_MARKER(variable) (void)(variable)
#endif
...
...
base_c/include/embb/base/c/internal/atomic/atomic_variables.h
View file @
a7c7b027
...
...
@@ -35,6 +35,8 @@
#include <intrin.h>
#endif
#ifdef EMBB_THREADING_ANALYSIS_MODE
#define EMBB_ATOMIC_INTERNAL_DEFINE_VARIABLE( \
EMBB_ATOMIC_PARAMETER_TYPE_NATIVE, \
EMBB_ATOMIC_PARAMETER_ATOMIC_TYPE_SUFFIX) \
...
...
@@ -45,6 +47,18 @@
uint32_t marker; \
} EMBB_CAT2(embb_atomic_, EMBB_ATOMIC_PARAMETER_ATOMIC_TYPE_SUFFIX);
#else
#define EMBB_ATOMIC_INTERNAL_DEFINE_VARIABLE( \
EMBB_ATOMIC_PARAMETER_TYPE_NATIVE, \
EMBB_ATOMIC_PARAMETER_ATOMIC_TYPE_SUFFIX) \
typedef struct \
{ \
volatile EMBB_ATOMIC_PARAMETER_TYPE_NATIVE internal_variable; \
} EMBB_CAT2(embb_atomic_, EMBB_ATOMIC_PARAMETER_ATOMIC_TYPE_SUFFIX);
#endif
EMBB_ATOMIC_INTERNAL_DEFINE_VARIABLE
(
char
,
char
)
EMBB_ATOMIC_INTERNAL_DEFINE_VARIABLE
(
short
,
short
)
EMBB_ATOMIC_INTERNAL_DEFINE_VARIABLE
(
unsigned
short
,
unsigned_short
)
...
...
base_c/include/embb/base/c/internal/atomic/destroy.h
View file @
a7c7b027
...
...
@@ -42,7 +42,6 @@
#define EMBB_ATOMIC_INTERNAL_DEFINE_DESTROY_METHOD(EMBB_ATOMIC_PARAMETER_TYPE_NATIVE, EMBB_ATOMIC_PARAMETER_ATOMIC_TYPE_SUFFIX, EMBB_ATOMIC_PARAMETER_TYPE_SIZE) \
EMBB_PLATFORM_INLINE void EMBB_CAT2(embb_atomic_destroy_, EMBB_ATOMIC_PARAMETER_ATOMIC_TYPE_SUFFIX)(\
EMBB_CAT2(embb_atomic_, EMBB_ATOMIC_PARAMETER_ATOMIC_TYPE_SUFFIX)* variable) { \
(void)variable; \
EMBB_ATOMIC_INIT_CHECK(variable); \
EMBB_ATOMIC_MUTEX_DESTROY(variable->internal_mutex); \
}
...
...
base_c/include/embb/base/c/internal/atomic/init.h
View file @
a7c7b027
...
...
@@ -43,7 +43,7 @@
EMBB_PLATFORM_INLINE void EMBB_CAT2(embb_atomic_init_, EMBB_ATOMIC_PARAMETER_ATOMIC_TYPE_SUFFIX)(\
EMBB_CAT2(embb_atomic_, EMBB_ATOMIC_PARAMETER_ATOMIC_TYPE_SUFFIX)* variable) { \
EMBB_ATOMIC_MUTEX_INIT(variable->internal_mutex); \
variable->marker = 0x12345678
; \
EMBB_ATOMIC_INIT_MARKER(variable)
; \
}
#undef EMBB_ATOMIC_METHOD_TO_GENERATE
...
...
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