Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuergen Haug2015-07-31 10:57:22 +0000
committerJuergen Haug2015-07-31 15:05:30 +0000
commitb60e224ecf3eddd9e93fd44308769f84ffc19744 (patch)
treea595b8745f525ebbb21c9d4877229bd9cbc265e7 /runtime/org.eclipse.etrice.runtime.c/src/platforms
parent33c71f0684c7483aa25428d765ebfb089a954a67 (diff)
downloadorg.eclipse.etrice-b60e224ecf3eddd9e93fd44308769f84ffc19744.tar.gz
org.eclipse.etrice-b60e224ecf3eddd9e93fd44308769f84ffc19744.tar.xz
org.eclipse.etrice-b60e224ecf3eddd9e93fd44308769f84ffc19744.zip
Bug 473951 - [runtime.c] runtime.c.tests fail under windows
Diffstat (limited to 'runtime/org.eclipse.etrice.runtime.c/src/platforms')
-rw-r--r--runtime/org.eclipse.etrice.runtime.c/src/platforms/MT_WIN_MinGW/etTimer.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/runtime/org.eclipse.etrice.runtime.c/src/platforms/MT_WIN_MinGW/etTimer.c b/runtime/org.eclipse.etrice.runtime.c/src/platforms/MT_WIN_MinGW/etTimer.c
index 68fcec378..a6d15487d 100644
--- a/runtime/org.eclipse.etrice.runtime.c/src/platforms/MT_WIN_MinGW/etTimer.c
+++ b/runtime/org.eclipse.etrice.runtime.c/src/platforms/MT_WIN_MinGW/etTimer.c
@@ -57,7 +57,7 @@ void etTimer_start(etTimer* self){
etLogger_logError("etTimer_start: no Timer Queue to create timer (NULL)");
}
else {
- if (CreateTimerQueueTimer( &(self->osTimerData), hTimerQueue, etTimer_callback, self, 0, elapse, 0) == ET_FALSE){
+ if (CreateTimerQueueTimer( &(self->osTimerData), hTimerQueue, etTimer_callback, self, elapse, elapse, 0) == ET_FALSE){
etLogger_logError("etTimer_start: Timer could not be created");
}
}
@@ -67,8 +67,11 @@ void etTimer_start(etTimer* self){
void etTimer_stop(etTimer* self){
ET_MSC_LOGGER_SYNC_ENTRY("etTimer", "stop")
+ // To wait until timer has expired use INVALID_HANDLE_VALUE
if (DeleteTimerQueueTimer(hTimerQueue, self->osTimerData, NULL) == ET_FALSE){
- etLogger_logError("etTimer_stop: Timer could not be stopped");
+ // ERROR_IO_PENDING indicates outstanding callback functions => no error
+ if(GetLastError() != ERROR_IO_PENDING)
+ etLogger_logError("etTimer_stop: Timer could not be stopped");
}
ET_MSC_LOGGER_SYNC_EXIT
}

Back to the top