diff options
author | Giovanni Di Sirio <gdisirio@gmail.com> | 2015-08-06 13:01:28 +0000 |
---|---|---|
committer | Giovanni Di Sirio <gdisirio@gmail.com> | 2015-08-06 13:01:28 +0000 |
commit | f8cb6e81eae24a2e2ddd5249a4cce4cfb1a9b52a (patch) | |
tree | 8095f571658a4384b57a409b78a76304bd5da701 /os/various | |
parent | 2d80f63d513700713870baa898fbae411464a6a9 (diff) | |
download | ChibiOS-f8cb6e81eae24a2e2ddd5249a4cce4cfb1a9b52a.tar.gz ChibiOS-f8cb6e81eae24a2e2ddd5249a4cce4cfb1a9b52a.tar.bz2 ChibiOS-f8cb6e81eae24a2e2ddd5249a4cce4cfb1a9b52a.zip |
Fixed bug #627.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@8171 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/various')
-rw-r--r-- | os/various/lwip_bindings/arch/sys_arch.c | 34 |
1 files changed, 18 insertions, 16 deletions
diff --git a/os/various/lwip_bindings/arch/sys_arch.c b/os/various/lwip_bindings/arch/sys_arch.c index 835d6f5c5..c2b72b72a 100644 --- a/os/various/lwip_bindings/arch/sys_arch.c +++ b/os/various/lwip_bindings/arch/sys_arch.c @@ -96,14 +96,15 @@ void sys_sem_signal_S(sys_sem_t *sem) { chSemSignalI(*sem);
chSchRescheduleS();
-}
-
-u32_t sys_arch_sem_wait(sys_sem_t *sem, u32_t timeout) {
- systime_t time, tmo;
-
- osalSysLock();
- tmo = timeout > 0 ? (systime_t)timeout : TIME_INFINITE;
- time = osalOsGetSystemTimeX();
+} + +u32_t sys_arch_sem_wait(sys_sem_t *sem, u32_t timeout) { + systime_t tmo; + u32_t time; + + osalSysLock(); + tmo = timeout > 0 ? (systime_t)timeout : TIME_INFINITE; + time = (u32_t)osalOsGetSystemTimeX();
if (chSemWaitTimeoutS(*sem, tmo) != MSG_OK)
time = SYS_ARCH_TIMEOUT;
else
@@ -167,14 +168,15 @@ err_t sys_mbox_trypost(sys_mbox_t *mbox, void *msg) { return ERR_MEM;
}
return ERR_OK;
-}
-
-u32_t sys_arch_mbox_fetch(sys_mbox_t *mbox, void **msg, u32_t timeout) {
- systime_t time, tmo;
-
- osalSysLock();
- tmo = timeout > 0 ? (systime_t)timeout : TIME_INFINITE;
- time = osalOsGetSystemTimeX();
+} + +u32_t sys_arch_mbox_fetch(sys_mbox_t *mbox, void **msg, u32_t timeout) { + u32_t time; + systime_t tmo; + + osalSysLock(); + tmo = timeout > 0 ? (systime_t)timeout : TIME_INFINITE; + time = (u32_t)osalOsGetSystemTimeX();
if (chMBFetchS(*mbox, (msg_t *)msg, tmo) != MSG_OK)
time = SYS_ARCH_TIMEOUT;
else
|