Commit 3fb52e5d by Marcus Winter

fixed more vc2012 problems

parent 28ea8fad
...@@ -292,7 +292,7 @@ void embb_atomic_xor_assign_TYPE( ...@@ -292,7 +292,7 @@ void embb_atomic_xor_assign_TYPE(
extern "C" { extern "C" {
#endif #endif
#include <embb/base/c/internal/cmake_config.h> #include <embb/base/c/internal/config.h>
#ifdef EMBB_THREADING_ANALYSIS_MODE #ifdef EMBB_THREADING_ANALYSIS_MODE
...@@ -335,11 +335,13 @@ void embb_mutex_destroy( ...@@ -335,11 +335,13 @@ void embb_mutex_destroy(
#define EMBB_ATOMIC_INIT_CHECK(variable) assert(variable->marker == 0x12345678) #define EMBB_ATOMIC_INIT_CHECK(variable) assert(variable->marker == 0x12345678)
#define EMBB_ATOMIC_INIT_MARKER(variable) variable->marker = 0x12345678 #define EMBB_ATOMIC_INIT_MARKER(variable) variable->marker = 0x12345678
#define EMBB_ATOMIC_DESTROY_MARKER(variable) variable->marker = 0
#else #else
#define EMBB_ATOMIC_INIT_CHECK(variable) (void)(variable) #define EMBB_ATOMIC_INIT_CHECK(variable) (void)(variable)
#define EMBB_ATOMIC_INIT_MARKER(variable) (void)(variable) #define EMBB_ATOMIC_INIT_MARKER(variable) (void)(variable)
#define EMBB_ATOMIC_DESTROY_MARKER(variable) (void)(variable)
#endif #endif
......
...@@ -44,6 +44,7 @@ ...@@ -44,6 +44,7 @@
EMBB_CAT2(embb_atomic_, EMBB_ATOMIC_PARAMETER_ATOMIC_TYPE_SUFFIX)* variable) { \ EMBB_CAT2(embb_atomic_, EMBB_ATOMIC_PARAMETER_ATOMIC_TYPE_SUFFIX)* variable) { \
EMBB_ATOMIC_INIT_CHECK(variable); \ EMBB_ATOMIC_INIT_CHECK(variable); \
EMBB_ATOMIC_MUTEX_DESTROY(variable->internal_mutex); \ EMBB_ATOMIC_MUTEX_DESTROY(variable->internal_mutex); \
EMBB_ATOMIC_DESTROY_MARKER(variable); \
} }
#undef EMBB_ATOMIC_METHOD_TO_GENERATE #undef EMBB_ATOMIC_METHOD_TO_GENERATE
......
...@@ -112,8 +112,6 @@ void ThreadIndexTest::TestN() { ...@@ -112,8 +112,6 @@ void ThreadIndexTest::TestN() {
embb_thread_join(&thread, NULL); embb_thread_join(&thread, NULL);
delete[] threads; delete[] threads;
embb_internal_thread_index_set_max(old_max); embb_internal_thread_index_set_max(old_max);
embb_atomic_destroy_int(&flag);
} }
int ThreadStart(void* arg) { int ThreadStart(void* arg) {
......
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