summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJürgen Gehring <Juergen.Gehring@bmw.de>2016-12-12 00:48:23 -0800
committerJürgen Gehring <Juergen.Gehring@bmw.de>2016-12-12 00:48:23 -0800
commit436750026fb1a27944584513c7191d1bc83e9f0d (patch)
tree4df006e10d30438fe241ce7aec3f8569062615c6 /include
parenta4c5fed7760238b2ef0e3b204801fed088c99fa7 (diff)
downloadgenivi-common-api-runtime-436750026fb1a27944584513c7191d1bc83e9f0d.tar.gz
CommonAPI 3.1.10.13.1.10.1
Diffstat (limited to 'include')
-rw-r--r--include/CommonAPI/Types.hpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/CommonAPI/Types.hpp b/include/CommonAPI/Types.hpp
index 6f6801d..4cdff5d 100644
--- a/include/CommonAPI/Types.hpp
+++ b/include/CommonAPI/Types.hpp
@@ -53,11 +53,21 @@ namespace CommonAPI {
static void __cdecl f(void); \
__declspec(allocate(".CRT$XCU")) void(__cdecl*f##_)(void) = f; \
static void __cdecl f(void)
+#define DEINITIALIZER(f) \
+ static void __cdecl f(void); \
+ static void _##f##_wrapper(void) { \
+ atexit(f); \
+ } \
+ __declspec(allocate(".CRT$XCU")) void(__cdecl * f##_)(void) = _##f##_wrapper; \
+ static void __cdecl f(void)
#else
#define CCALL
#define INITIALIZER(f) \
static void f(void) __attribute__((constructor)); \
static void f(void)
+#define DEINITIALIZER(f) \
+ static void f(void) __attribute__((destructor)); \
+ static void f(void)
#endif
namespace CommonAPI {