Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
宁楠萍
rt-thread
提交
a0e62f66
R
rt-thread
项目概览
宁楠萍
/
rt-thread
与 Fork 源项目一致
Fork自
RT-Thread / rt-thread
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
rt-thread
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
a0e62f66
编写于
12月 29, 2019
作者:
L
liuxinaliang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[net][lwip] fix assert in the sys_arch_mbox_fetch function when close socket
上级
c2322353
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
15 addition
and
25 deletion
+15
-25
components/net/lwip-1.4.1/src/arch/sys_arch.c
components/net/lwip-1.4.1/src/arch/sys_arch.c
+4
-8
components/net/lwip-2.0.2/src/arch/sys_arch.c
components/net/lwip-2.0.2/src/arch/sys_arch.c
+5
-8
components/net/lwip-2.1.0/src/arch/sys_arch.c
components/net/lwip-2.1.0/src/arch/sys_arch.c
+6
-9
未找到文件。
components/net/lwip-1.4.1/src/arch/sys_arch.c
浏览文件 @
a0e62f66
...
...
@@ -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.
*/
...
...
@@ -259,7 +259,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
)
...
...
@@ -498,14 +498,10 @@ 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
)
if
(
ret
!=
RT_EOK
)
{
return
SYS_ARCH_TIMEOUT
;
}
else
{
LWIP_ASSERT
(
"rt_mb_recv returned with error!"
,
ret
==
RT_EOK
);
}
/* get elapse msecond */
tick
=
rt_tick_get
()
-
tick
;
...
...
@@ -536,7 +532,7 @@ u32_t sys_arch_mbox_tryfetch(sys_mbox_t *mbox, void **msg)
}
else
{
if
(
ret
==
RT_EOK
)
if
(
ret
==
RT_EOK
)
ret
=
1
;
}
...
...
components/net/lwip-2.0.2/src/arch/sys_arch.c
浏览文件 @
a0e62f66
...
...
@@ -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.
*/
...
...
@@ -270,7 +270,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
)
...
...
@@ -509,12 +509,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 */
...
...
@@ -545,7 +542,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
;
}
...
...
components/net/lwip-2.1.0/src/arch/sys_arch.c
浏览文件 @
a0e62f66
...
...
@@ -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
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录