diff options
author | Giovanni Di Sirio <gdisirio@gmail.com> | 2016-01-23 07:56:27 +0000 |
---|---|---|
committer | Giovanni Di Sirio <gdisirio@gmail.com> | 2016-01-23 07:56:27 +0000 |
commit | 2a444605ded34dba2f32ce62e47eae178e49babf (patch) | |
tree | fab0172de7b4d52ad869ceaa8c9cc5e9bf38c3c7 /os | |
parent | 1c06e1446e46bb1053035923b5367a86ec8815cc (diff) | |
download | ChibiOS-2a444605ded34dba2f32ce62e47eae178e49babf.tar.gz ChibiOS-2a444605ded34dba2f32ce62e47eae178e49babf.tar.bz2 ChibiOS-2a444605ded34dba2f32ce62e47eae178e49babf.zip |
Fixed bug #696.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@8792 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os')
-rw-r--r-- | os/various/lwip_bindings/arch/sys_arch.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/os/various/lwip_bindings/arch/sys_arch.c b/os/various/lwip_bindings/arch/sys_arch.c index c2b72b72a..e11d65c0e 100644 --- a/os/various/lwip_bindings/arch/sys_arch.c +++ b/os/various/lwip_bindings/arch/sys_arch.c @@ -103,12 +103,12 @@ u32_t sys_arch_sem_wait(sys_sem_t *sem, u32_t timeout) { u32_t time; osalSysLock(); - tmo = timeout > 0 ? (systime_t)timeout : TIME_INFINITE; + tmo = timeout > 0 ? MS2ST((systime_t)timeout) : TIME_INFINITE; time = (u32_t)osalOsGetSystemTimeX();
if (chSemWaitTimeoutS(*sem, tmo) != MSG_OK)
time = SYS_ARCH_TIMEOUT;
else
- time = osalOsGetSystemTimeX() - time;
+ time = (u32_t)ST2MS(osalOsGetSystemTimeX()) - time;
osalSysUnlock();
return time;
}
@@ -175,12 +175,12 @@ u32_t sys_arch_mbox_fetch(sys_mbox_t *mbox, void **msg, u32_t timeout) { systime_t tmo; osalSysLock(); - tmo = timeout > 0 ? (systime_t)timeout : TIME_INFINITE; + tmo = timeout > 0 ? MS2ST((systime_t)timeout) : TIME_INFINITE; time = (u32_t)osalOsGetSystemTimeX();
if (chMBFetchS(*mbox, (msg_t *)msg, tmo) != MSG_OK)
time = SYS_ARCH_TIMEOUT;
else
- time = osalOsGetSystemTimeX() - time;
+ time = (u32_t)ST2MS(osalOsGetSystemTimeX()) - time;
osalSysUnlock();
return time;
}
|