diff options
author | Thomas Schuetz | 2013-04-04 12:10:36 +0000 |
---|---|---|
committer | Thomas Schuetz | 2013-04-04 12:10:36 +0000 |
commit | 55713dae5563d9c09a285605cd4677a915a0b169 (patch) | |
tree | ec3674ef0bb6dc5657e0c16616f0525e7763e854 /runtime/org.eclipse.etrice.runtime.c/src/platforms | |
parent | a028053da2837752a8260a0a7ceb1c1fe4740ebe (diff) | |
download | org.eclipse.etrice-55713dae5563d9c09a285605cd4677a915a0b169.tar.gz org.eclipse.etrice-55713dae5563d9c09a285605cd4677a915a0b169.tar.xz org.eclipse.etrice-55713dae5563d9c09a285605cd4677a915a0b169.zip |
[runtime.c, generator.c] bugfixes for messaging and MSC logging
Change-Id: I2d46582329df8e2c6b070ef649741f6eec7347f2
Diffstat (limited to 'runtime/org.eclipse.etrice.runtime.c/src/platforms')
-rw-r--r-- | runtime/org.eclipse.etrice.runtime.c/src/platforms/generic/etPlatform.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/runtime/org.eclipse.etrice.runtime.c/src/platforms/generic/etPlatform.c b/runtime/org.eclipse.etrice.runtime.c/src/platforms/generic/etPlatform.c index e29a8ec0a..efe9f2775 100644 --- a/runtime/org.eclipse.etrice.runtime.c/src/platforms/generic/etPlatform.c +++ b/runtime/org.eclipse.etrice.runtime.c/src/platforms/generic/etPlatform.c @@ -32,13 +32,23 @@ void etUserExit(void){ } #if defined __MINGW32__
/******************thread********************/
+void etThread_execute(etThread* self);
+
void etThread_construct(etThread* self){
ET_MSC_LOGGER_SYNC_ENTRY("etThread", "construct")
- self->osData = (HANDLE)_beginthread( self->threadFunction, self->stacksize, self->threadFunctionData );
+ self->osData = (HANDLE)_beginthread( (etThreadFunction)etThread_execute, self->stacksize, self );
SetThreadPriority(self->osData, self->priority);
ET_MSC_LOGGER_SYNC_EXIT
}
+void etThread_execute(etThread* self){
+ ET_MSC_LOGGER_SYNC_ENTRY("etThread", "execute")
+ /* etThread_execute redirects the call from the thread to the execute function in the eTrice runtime to enable correct synchronous MSC logging */
+ self->threadFunction(self->threadFunctionData);
+ ET_MSC_LOGGER_SYNC_EXIT
+}
+
+
void etThread_destruct(etThread* self){
ET_MSC_LOGGER_SYNC_ENTRY("etThread", "destruct")
TerminateThread(self->osData, 0);
|