Fixed bug #696.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@8792 35acf78f-673a-0410-8e92-d51de3d6d3f4master
parent
1c06e1446e
commit
2a444605de
|
@ -103,12 +103,12 @@ u32_t sys_arch_sem_wait(sys_sem_t *sem, u32_t timeout) {
|
||||||
u32_t time;
|
u32_t time;
|
||||||
|
|
||||||
osalSysLock();
|
osalSysLock();
|
||||||
tmo = timeout > 0 ? (systime_t)timeout : TIME_INFINITE;
|
tmo = timeout > 0 ? MS2ST((systime_t)timeout) : TIME_INFINITE;
|
||||||
time = (u32_t)osalOsGetSystemTimeX();
|
time = (u32_t)osalOsGetSystemTimeX();
|
||||||
if (chSemWaitTimeoutS(*sem, tmo) != MSG_OK)
|
if (chSemWaitTimeoutS(*sem, tmo) != MSG_OK)
|
||||||
time = SYS_ARCH_TIMEOUT;
|
time = SYS_ARCH_TIMEOUT;
|
||||||
else
|
else
|
||||||
time = osalOsGetSystemTimeX() - time;
|
time = (u32_t)ST2MS(osalOsGetSystemTimeX()) - time;
|
||||||
osalSysUnlock();
|
osalSysUnlock();
|
||||||
return time;
|
return time;
|
||||||
}
|
}
|
||||||
|
@ -175,12 +175,12 @@ u32_t sys_arch_mbox_fetch(sys_mbox_t *mbox, void **msg, u32_t timeout) {
|
||||||
systime_t tmo;
|
systime_t tmo;
|
||||||
|
|
||||||
osalSysLock();
|
osalSysLock();
|
||||||
tmo = timeout > 0 ? (systime_t)timeout : TIME_INFINITE;
|
tmo = timeout > 0 ? MS2ST((systime_t)timeout) : TIME_INFINITE;
|
||||||
time = (u32_t)osalOsGetSystemTimeX();
|
time = (u32_t)osalOsGetSystemTimeX();
|
||||||
if (chMBFetchS(*mbox, (msg_t *)msg, tmo) != MSG_OK)
|
if (chMBFetchS(*mbox, (msg_t *)msg, tmo) != MSG_OK)
|
||||||
time = SYS_ARCH_TIMEOUT;
|
time = SYS_ARCH_TIMEOUT;
|
||||||
else
|
else
|
||||||
time = osalOsGetSystemTimeX() - time;
|
time = (u32_t)ST2MS(osalOsGetSystemTimeX()) - time;
|
||||||
osalSysUnlock();
|
osalSysUnlock();
|
||||||
return time;
|
return time;
|
||||||
}
|
}
|
||||||
|
|
|
@ -76,6 +76,8 @@
|
||||||
- RT: Removed the p_msg field from the thread_t structure saving a
|
- RT: Removed the p_msg field from the thread_t structure saving a
|
||||||
msg_t-sized field from the structure. Messages now use a new field
|
msg_t-sized field from the structure. Messages now use a new field
|
||||||
into the p_u union. Now synchronous messages are even faster.
|
into the p_u union. Now synchronous messages are even faster.
|
||||||
|
- VAR: Fixed missing time convesion in lwIP arch module (bug #696)
|
||||||
|
(backported to 3.0.5 and 16.1.2).
|
||||||
- HAL: Fixed incorrect handling of TIME_IMMEDIATE in the HAL buffer queues
|
- HAL: Fixed incorrect handling of TIME_IMMEDIATE in the HAL buffer queues
|
||||||
(bug #695)(backported to 16.1.2).
|
(bug #695)(backported to 16.1.2).
|
||||||
- NIL: Fixed NIL_CFG_USE_EVENTS not properly checked in NIL (bug #694)
|
- NIL: Fixed NIL_CFG_USE_EVENTS not properly checked in NIL (bug #694)
|
||||||
|
|
Loading…
Reference in New Issue