bug fix in arch implmentation

git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1628 bbd45198-f89e-11dd-88c7-29a3b14d5316
This commit is contained in:
mbbill@gmail.com
2011-07-13 12:02:34 +00:00
parent 573b73465e
commit 86d6c01c9e
3 changed files with 22 additions and 19 deletions

View File

@@ -156,9 +156,13 @@ u32_t sys_arch_mbox_fetch(sys_mbox_t mbox, void **msg, u32_t timeout)
}
ret = rt_mb_recv(mbox, (rt_uint32_t *)msg, t);
if(ret == -RT_ETIMEOUT) return SYS_ARCH_TIMEOUT;
else if (ret == RT_EOK) ret = 1;
if(ret == -RT_ETIMEOUT)
return SYS_ARCH_TIMEOUT;
else
{
LWIP_ASSERT("rt_mb_recv returned with error!", ret == RT_EOK);
}
LWIP_DEBUGF(SYS_DEBUG, ("%s, Fetch mail: %s , 0x%x\n", LWIP_THREAD_NAME,
mbox->mb->parent.parent.name, *(rt_uint32_t **)msg));