|
@@ -27,7 +27,7 @@
|
|
|
* Change Logs:
|
|
|
* Date Author Notes
|
|
|
* 2012-12-8 Bernard add file header
|
|
|
- * export bsd socket symbol for RT-Thread Application Module
|
|
|
+ * export bsd socket symbol for RT-Thread Application Module
|
|
|
* 2017-11-15 Bernard add lock for init_done callback.
|
|
|
* 2018-11-02 MurphyZhao port to lwip2.1.0
|
|
|
*/
|
|
@@ -78,7 +78,7 @@ static err_t netif_device_init(struct netif *netif)
|
|
|
/* copy device flags to netif flags */
|
|
|
netif->flags = ethif->flags;
|
|
|
netif->mtu = ETHERNET_MTU;
|
|
|
-
|
|
|
+
|
|
|
/* set output */
|
|
|
netif->output = etharp_output;
|
|
|
|
|
@@ -278,7 +278,7 @@ void sys_sem_signal(sys_sem_t *sem)
|
|
|
*
|
|
|
* @return If the timeout argument is non-zero, it will return the number of milliseconds
|
|
|
* spent waiting for the semaphore to be signaled; If the semaphore isn't signaled
|
|
|
- * within the specified time, it will return SYS_ARCH_TIMEOUT; If the thread doesn't
|
|
|
+ * within the specified time, it will return SYS_ARCH_TIMEOUT; If the thread doesn't
|
|
|
* wait for the semaphore, it will return zero
|
|
|
*/
|
|
|
u32_t sys_arch_sem_wait(sys_sem_t *sem, u32_t timeout)
|
|
@@ -523,12 +523,9 @@ u32_t sys_arch_mbox_fetch(sys_mbox_t *mbox, void **msg, u32_t timeout)
|
|
|
}
|
|
|
|
|
|
ret = rt_mb_recv(*mbox, (rt_ubase_t *)msg, t);
|
|
|
-
|
|
|
- if(ret == -RT_ETIMEOUT)
|
|
|
- return SYS_ARCH_TIMEOUT;
|
|
|
- else
|
|
|
+ if(ret != RT_EOK)
|
|
|
{
|
|
|
- LWIP_ASSERT("rt_mb_recv returned with error!", ret == RT_EOK);
|
|
|
+ return SYS_ARCH_TIMEOUT;
|
|
|
}
|
|
|
|
|
|
/* get elapse msecond */
|
|
@@ -559,7 +556,7 @@ u32_t sys_arch_mbox_tryfetch(sys_mbox_t *mbox, void **msg)
|
|
|
return SYS_ARCH_TIMEOUT;
|
|
|
else
|
|
|
{
|
|
|
- if (ret == RT_EOK)
|
|
|
+ if (ret == RT_EOK)
|
|
|
ret = 1;
|
|
|
}
|
|
|
|