aboutsummaryrefslogtreecommitdiffstats
path: root/os
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2009-12-24 09:47:56 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2009-12-24 09:47:56 +0000
commit282ffcd5ba93cc6c3e11b2b08302497c3a8a8538 (patch)
tree4b400f2be666c726fad47a24ac3438f26e7d7eba /os
parent0873332c30f78769147f0cb16d71f38ed846a814 (diff)
downloadChibiOS-282ffcd5ba93cc6c3e11b2b08302497c3a8a8538.tar.gz
ChibiOS-282ffcd5ba93cc6c3e11b2b08302497c3a8a8538.tar.bz2
ChibiOS-282ffcd5ba93cc6c3e11b2b08302497c3a8a8538.zip
Linux demo ok.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1464 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os')
-rw-r--r--os/hal/platforms/Linux/hal_lld.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/os/hal/platforms/Linux/hal_lld.c b/os/hal/platforms/Linux/hal_lld.c
index a67790d8a..3f045b138 100644
--- a/os/hal/platforms/Linux/hal_lld.c
+++ b/os/hal/platforms/Linux/hal_lld.c
@@ -60,6 +60,8 @@ static struct timeval tick = {0, 1000000 / CH_FREQUENCY};
void hal_lld_init(void) {
puts("Win32 ChibiOS/RT simulator (Linux)\n");
+ gettimeofday(&nextcnt, NULL);
+ timeradd(&nextcnt, &tick, &nextcnt);
}
/**
@@ -77,7 +79,7 @@ void ChkIntSources(void) {
#endif
gettimeofday(&tv, NULL);
- if (timercmp(&nextcnt, &tv, <)) {
+ if (timercmp(&tv, &nextcnt, >=)) {
timeradd(&nextcnt, &tick, &nextcnt);
chSysTimerHandlerI();
if (chSchIsRescRequiredExI())