Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
2345VOR
rt-thread
提交
658b2c10
R
rt-thread
项目概览
2345VOR
/
rt-thread
与 Fork 源项目一致
Fork自
RT-Thread / rt-thread
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
rt-thread
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
658b2c10
编写于
1月 27, 2022
作者:
xpxyr
提交者:
Bernard Xiong
1月 28, 2022
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix 32bit & 64bit value to pointer interconvert.
上级
039e2ff5
变更
9
隐藏空白更改
内联
并排
Showing
9 changed file
with
16 addition
and
16 deletion
+16
-16
components/cplusplus/cxx_mail.h
components/cplusplus/cxx_mail.h
+1
-1
components/lwp/lwp_mem.c
components/lwp/lwp_mem.c
+1
-1
components/lwp/lwp_memheap.c
components/lwp/lwp_memheap.c
+1
-1
components/net/lwip-1.4.1/src/arch/sys_arch.c
components/net/lwip-1.4.1/src/arch/sys_arch.c
+2
-2
components/net/lwip-1.4.1/src/netif/ethernetif.c
components/net/lwip-1.4.1/src/netif/ethernetif.c
+3
-3
components/net/lwip-2.0.3/src/netif/ethernetif.c
components/net/lwip-2.0.3/src/netif/ethernetif.c
+1
-1
components/net/lwip-2.1.2/src/arch/sys_arch.c
components/net/lwip-2.1.2/src/arch/sys_arch.c
+2
-2
components/net/lwip-2.1.2/src/netif/ethernetif.c
components/net/lwip-2.1.2/src/netif/ethernetif.c
+3
-3
examples/utest/testcases/kernel/memheap_tc.c
examples/utest/testcases/kernel/memheap_tc.c
+2
-2
未找到文件。
components/cplusplus/cxx_mail.h
浏览文件 @
658b2c10
...
@@ -51,7 +51,7 @@ public:
...
@@ -51,7 +51,7 @@ public:
else
else
tick
=
rt_tick_from_millisecond
(
millisec
);
tick
=
rt_tick_from_millisecond
(
millisec
);
return
rt_mb_send_wait
(
&
mID
,
(
rt_u
int32
_t
)
mptr
,
tick
)
==
RT_EOK
;
return
rt_mb_send_wait
(
&
mID
,
(
rt_u
base
_t
)
mptr
,
tick
)
==
RT_EOK
;
}
}
/** Get a mail from a queue.
/** Get a mail from a queue.
...
...
components/lwp/lwp_mem.c
浏览文件 @
658b2c10
...
@@ -17,7 +17,7 @@
...
@@ -17,7 +17,7 @@
// todo: remove repleat code
// todo: remove repleat code
#define RT_MEMHEAP_SIZE RT_ALIGN(sizeof(struct rt_lwp_memheap_item), RT_ALIGN_SIZE)
#define RT_MEMHEAP_SIZE RT_ALIGN(sizeof(struct rt_lwp_memheap_item), RT_ALIGN_SIZE)
#define MEMITEM_SIZE(item) ((rt_u
int32_t)item->next - (rt_uint32
_t)item - RT_MEMHEAP_SIZE)
#define MEMITEM_SIZE(item) ((rt_u
base_t)item->next - (rt_ubase
_t)item - RT_MEMHEAP_SIZE)
#ifndef LWP_MEM_PAGE_SIZE
#ifndef LWP_MEM_PAGE_SIZE
#define LWP_MEM_PAGE_SIZE (4 * 1024)
#define LWP_MEM_PAGE_SIZE (4 * 1024)
...
...
components/lwp/lwp_memheap.c
浏览文件 @
658b2c10
...
@@ -29,7 +29,7 @@
...
@@ -29,7 +29,7 @@
#define RT_MEMHEAP_MINIALLOC 12
#define RT_MEMHEAP_MINIALLOC 12
#define RT_MEMHEAP_SIZE RT_ALIGN(sizeof(struct rt_lwp_memheap_item), RT_ALIGN_SIZE)
#define RT_MEMHEAP_SIZE RT_ALIGN(sizeof(struct rt_lwp_memheap_item), RT_ALIGN_SIZE)
#define MEMITEM_SIZE(item) ((rt_u
int32_t)item->next - (rt_uint32
_t)item - RT_MEMHEAP_SIZE)
#define MEMITEM_SIZE(item) ((rt_u
base_t)item->next - (rt_ubase
_t)item - RT_MEMHEAP_SIZE)
/*
/*
* The initialized memory pool will be:
* The initialized memory pool will be:
...
...
components/net/lwip-1.4.1/src/arch/sys_arch.c
浏览文件 @
658b2c10
...
@@ -450,7 +450,7 @@ void sys_mbox_post(sys_mbox_t *mbox, void *msg)
...
@@ -450,7 +450,7 @@ void sys_mbox_post(sys_mbox_t *mbox, void *msg)
{
{
RT_DEBUG_NOT_IN_INTERRUPT
;
RT_DEBUG_NOT_IN_INTERRUPT
;
rt_mb_send_wait
(
*
mbox
,
(
rt_u
int32
_t
)
msg
,
RT_WAITING_FOREVER
);
rt_mb_send_wait
(
*
mbox
,
(
rt_u
base
_t
)
msg
,
RT_WAITING_FOREVER
);
return
;
return
;
}
}
...
@@ -462,7 +462,7 @@ void sys_mbox_post(sys_mbox_t *mbox, void *msg)
...
@@ -462,7 +462,7 @@ void sys_mbox_post(sys_mbox_t *mbox, void *msg)
*/
*/
err_t
sys_mbox_trypost
(
sys_mbox_t
*
mbox
,
void
*
msg
)
err_t
sys_mbox_trypost
(
sys_mbox_t
*
mbox
,
void
*
msg
)
{
{
if
(
rt_mb_send
(
*
mbox
,
(
rt_u
int32
_t
)
msg
)
==
RT_EOK
)
if
(
rt_mb_send
(
*
mbox
,
(
rt_u
base
_t
)
msg
)
==
RT_EOK
)
return
ERR_OK
;
return
ERR_OK
;
return
ERR_MEM
;
return
ERR_MEM
;
...
...
components/net/lwip-1.4.1/src/netif/ethernetif.c
浏览文件 @
658b2c10
...
@@ -374,7 +374,7 @@ static err_t ethernetif_linkoutput(struct netif *netif, struct pbuf *p)
...
@@ -374,7 +374,7 @@ static err_t ethernetif_linkoutput(struct netif *netif, struct pbuf *p)
/* send a message to eth tx thread */
/* send a message to eth tx thread */
msg
.
netif
=
netif
;
msg
.
netif
=
netif
;
msg
.
buf
=
p
;
msg
.
buf
=
p
;
if
(
rt_mb_send
(
&
eth_tx_thread_mb
,
(
rt_u
int32
_t
)
&
msg
)
==
RT_EOK
)
if
(
rt_mb_send
(
&
eth_tx_thread_mb
,
(
rt_u
base
_t
)
&
msg
)
==
RT_EOK
)
{
{
/* waiting for ack */
/* waiting for ack */
rt_sem_take
(
&
(
enetif
->
tx_ack
),
RT_WAITING_FOREVER
);
rt_sem_take
(
&
(
enetif
->
tx_ack
),
RT_WAITING_FOREVER
);
...
@@ -556,7 +556,7 @@ rt_err_t eth_device_ready(struct eth_device* dev)
...
@@ -556,7 +556,7 @@ rt_err_t eth_device_ready(struct eth_device* dev)
if
(
dev
->
rx_notice
==
RT_FALSE
)
if
(
dev
->
rx_notice
==
RT_FALSE
)
{
{
dev
->
rx_notice
=
RT_TRUE
;
dev
->
rx_notice
=
RT_TRUE
;
return
rt_mb_send
(
&
eth_rx_thread_mb
,
(
rt_u
int32
_t
)
dev
);
return
rt_mb_send
(
&
eth_rx_thread_mb
,
(
rt_u
base
_t
)
dev
);
}
}
else
else
return
RT_EOK
;
return
RT_EOK
;
...
@@ -581,7 +581,7 @@ rt_err_t eth_device_linkchange(struct eth_device* dev, rt_bool_t up)
...
@@ -581,7 +581,7 @@ rt_err_t eth_device_linkchange(struct eth_device* dev, rt_bool_t up)
rt_hw_interrupt_enable
(
level
);
rt_hw_interrupt_enable
(
level
);
/* post message to ethernet thread */
/* post message to ethernet thread */
return
rt_mb_send
(
&
eth_rx_thread_mb
,
(
rt_u
int32
_t
)
dev
);
return
rt_mb_send
(
&
eth_rx_thread_mb
,
(
rt_u
base
_t
)
dev
);
}
}
#else
#else
/* NOTE: please not use it in interrupt when no RxThread exist */
/* NOTE: please not use it in interrupt when no RxThread exist */
...
...
components/net/lwip-2.0.3/src/netif/ethernetif.c
浏览文件 @
658b2c10
...
@@ -605,7 +605,7 @@ rt_err_t eth_device_ready(struct eth_device* dev)
...
@@ -605,7 +605,7 @@ rt_err_t eth_device_ready(struct eth_device* dev)
if
(
dev
->
rx_notice
==
RT_FALSE
)
if
(
dev
->
rx_notice
==
RT_FALSE
)
{
{
dev
->
rx_notice
=
RT_TRUE
;
dev
->
rx_notice
=
RT_TRUE
;
return
rt_mb_send
(
&
eth_rx_thread_mb
,
(
rt_u
int32
_t
)
dev
);
return
rt_mb_send
(
&
eth_rx_thread_mb
,
(
rt_u
base
_t
)
dev
);
}
}
else
else
return
RT_EOK
;
return
RT_EOK
;
...
...
components/net/lwip-2.1.2/src/arch/sys_arch.c
浏览文件 @
658b2c10
...
@@ -469,7 +469,7 @@ void sys_mbox_post(sys_mbox_t *mbox, void *msg)
...
@@ -469,7 +469,7 @@ void sys_mbox_post(sys_mbox_t *mbox, void *msg)
{
{
RT_DEBUG_NOT_IN_INTERRUPT
;
RT_DEBUG_NOT_IN_INTERRUPT
;
rt_mb_send_wait
(
*
mbox
,
(
rt_u
int32
_t
)
msg
,
RT_WAITING_FOREVER
);
rt_mb_send_wait
(
*
mbox
,
(
rt_u
base
_t
)
msg
,
RT_WAITING_FOREVER
);
return
;
return
;
}
}
...
@@ -481,7 +481,7 @@ void sys_mbox_post(sys_mbox_t *mbox, void *msg)
...
@@ -481,7 +481,7 @@ void sys_mbox_post(sys_mbox_t *mbox, void *msg)
*/
*/
err_t
sys_mbox_trypost
(
sys_mbox_t
*
mbox
,
void
*
msg
)
err_t
sys_mbox_trypost
(
sys_mbox_t
*
mbox
,
void
*
msg
)
{
{
if
(
rt_mb_send
(
*
mbox
,
(
rt_u
int32
_t
)
msg
)
==
RT_EOK
)
if
(
rt_mb_send
(
*
mbox
,
(
rt_u
base
_t
)
msg
)
==
RT_EOK
)
return
ERR_OK
;
return
ERR_OK
;
return
ERR_MEM
;
return
ERR_MEM
;
...
...
components/net/lwip-2.1.2/src/netif/ethernetif.c
浏览文件 @
658b2c10
...
@@ -405,7 +405,7 @@ static err_t ethernetif_linkoutput(struct netif *netif, struct pbuf *p)
...
@@ -405,7 +405,7 @@ static err_t ethernetif_linkoutput(struct netif *netif, struct pbuf *p)
msg
.
netif
=
netif
;
msg
.
netif
=
netif
;
msg
.
buf
=
p
;
msg
.
buf
=
p
;
rt_completion_init
(
&
msg
.
ack
);
rt_completion_init
(
&
msg
.
ack
);
if
(
rt_mb_send
(
&
eth_tx_thread_mb
,
(
rt_u
int32
_t
)
&
msg
)
==
RT_EOK
)
if
(
rt_mb_send
(
&
eth_tx_thread_mb
,
(
rt_u
base
_t
)
&
msg
)
==
RT_EOK
)
{
{
/* waiting for ack */
/* waiting for ack */
rt_completion_wait
(
&
msg
.
ack
,
RT_WAITING_FOREVER
);
rt_completion_wait
(
&
msg
.
ack
,
RT_WAITING_FOREVER
);
...
@@ -615,7 +615,7 @@ rt_err_t eth_device_ready(struct eth_device* dev)
...
@@ -615,7 +615,7 @@ rt_err_t eth_device_ready(struct eth_device* dev)
if
(
dev
->
rx_notice
==
RT_FALSE
)
if
(
dev
->
rx_notice
==
RT_FALSE
)
{
{
dev
->
rx_notice
=
RT_TRUE
;
dev
->
rx_notice
=
RT_TRUE
;
return
rt_mb_send
(
&
eth_rx_thread_mb
,
(
rt_u
int32
_t
)
dev
);
return
rt_mb_send
(
&
eth_rx_thread_mb
,
(
rt_u
base
_t
)
dev
);
}
}
else
else
return
RT_EOK
;
return
RT_EOK
;
...
@@ -640,7 +640,7 @@ rt_err_t eth_device_linkchange(struct eth_device* dev, rt_bool_t up)
...
@@ -640,7 +640,7 @@ rt_err_t eth_device_linkchange(struct eth_device* dev, rt_bool_t up)
rt_hw_interrupt_enable
(
level
);
rt_hw_interrupt_enable
(
level
);
/* post message to ethernet thread */
/* post message to ethernet thread */
return
rt_mb_send
(
&
eth_rx_thread_mb
,
(
rt_u
int32
_t
)
dev
);
return
rt_mb_send
(
&
eth_rx_thread_mb
,
(
rt_u
base
_t
)
dev
);
}
}
#else
#else
/* NOTE: please not use it in interrupt when no RxThread exist */
/* NOTE: please not use it in interrupt when no RxThread exist */
...
...
examples/utest/testcases/kernel/memheap_tc.c
浏览文件 @
658b2c10
...
@@ -22,12 +22,12 @@
...
@@ -22,12 +22,12 @@
static
void
memheap_test
(
void
)
static
void
memheap_test
(
void
)
{
{
struct
rt_memheap
heap1
;
struct
rt_memheap
heap1
;
rt_u
int32
_t
ptr_start
;
rt_u
base
_t
ptr_start
;
void
*
ptr
[
SLICE_NUM
];
void
*
ptr
[
SLICE_NUM
];
int
i
,
cnt
=
0
;
int
i
,
cnt
=
0
;
/* init heap */
/* init heap */
ptr_start
=
(
rt_u
int32
_t
)
rt_malloc_align
(
HEAP_SIZE
,
HEAP_ALIGN
);
ptr_start
=
(
rt_u
base
_t
)
rt_malloc_align
(
HEAP_SIZE
,
HEAP_ALIGN
);
if
(
ptr_start
==
RT_NULL
)
if
(
ptr_start
==
RT_NULL
)
{
{
rt_kprintf
(
"totle size too big,can not malloc memory!"
);
rt_kprintf
(
"totle size too big,can not malloc memory!"
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录