Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
2301_76519099
rt-thread
提交
a3d96ed5
R
rt-thread
项目概览
2301_76519099
/
rt-thread
与 Fork 源项目一致
Fork自
RT-Thread / rt-thread
通知
3
Star
1
Fork
1
代码
文件
提交
分支
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,发现更多精彩内容 >>
提交
a3d96ed5
编写于
12月 12, 2017
作者:
B
Bernard Xiong
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Use rt_object_get_information to get object chain
上级
2f409c85
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
48 addition
and
16 deletion
+48
-16
bsp/simulator/drivers/module_win32.c
bsp/simulator/drivers/module_win32.c
+3
-3
components/finsh/cmd.c
components/finsh/cmd.c
+45
-13
未找到文件。
bsp/simulator/drivers/module_win32.c
浏览文件 @
a3d96ed5
...
...
@@ -164,15 +164,15 @@ rt_module_t rt_module_find(const char *name)
struct
rt_object
*
object
;
struct
rt_list_node
*
node
;
extern
struct
rt_object_information
rt_object_container
[];
RT_DEBUG_NOT_IN_INTERRUPT
;
/* enter critical */
rt_enter_critical
();
/* try to find device object */
information
=
&
rt_object_container
[
RT_Object_Class_Module
];
information
=
rt_object_get_information
(
RT_Object_Class_Module
);
RT_ASSERT
(
information
!=
RT_NULL
);
for
(
node
=
information
->
object_list
.
next
;
node
!=
&
(
information
->
object_list
);
node
=
node
->
next
)
...
...
components/finsh/cmd.c
浏览文件 @
a3d96ed5
...
...
@@ -67,8 +67,6 @@ long version(void)
FINSH_FUNCTION_EXPORT
(
version
,
show
RT
-
Thread
version
information
);
MSH_CMD_EXPORT
(
version
,
show
RT
-
Thread
version
information
);
extern
struct
rt_object_information
rt_object_container
[];
static
int
object_name_maxlen
(
struct
rt_list_node
*
list
)
{
struct
rt_list_node
*
node
;
...
...
@@ -135,7 +133,10 @@ static long _list_thread(struct rt_list_node *list)
long
list_thread
(
void
)
{
return
_list_thread
(
&
rt_object_container
[
RT_Object_Class_Thread
].
object_list
);
struct
rt_object_information
*
info
;
info
=
rt_object_get_information
(
RT_Object_Class_Thread
);
return
_list_thread
(
&
info
->
object_list
);
}
FINSH_FUNCTION_EXPORT
(
list_thread
,
list
thread
);
MSH_CMD_EXPORT
(
list_thread
,
list
thread
);
...
...
@@ -195,7 +196,11 @@ static long _list_sem(struct rt_list_node *list)
long
list_sem
(
void
)
{
return
_list_sem
(
&
rt_object_container
[
RT_Object_Class_Semaphore
].
object_list
);
struct
rt_object_information
*
info
;
info
=
rt_object_get_information
(
RT_Object_Class_Semaphore
);
return
_list_sem
(
&
info
->
object_list
);
}
FINSH_FUNCTION_EXPORT
(
list_sem
,
list
semaphone
in
system
);
MSH_CMD_EXPORT
(
list_sem
,
list
semaphore
in
system
);
...
...
@@ -237,7 +242,10 @@ static long _list_event(struct rt_list_node *list)
long
list_event
(
void
)
{
return
_list_event
(
&
rt_object_container
[
RT_Object_Class_Event
].
object_list
);
struct
rt_object_information
*
info
;
info
=
rt_object_get_information
(
RT_Object_Class_Event
);
return
_list_event
(
&
info
->
object_list
);
}
FINSH_FUNCTION_EXPORT
(
list_event
,
list
event
in
system
);
MSH_CMD_EXPORT
(
list_event
,
list
event
in
system
);
...
...
@@ -270,7 +278,11 @@ static long _list_mutex(struct rt_list_node *list)
long
list_mutex
(
void
)
{
return
_list_mutex
(
&
rt_object_container
[
RT_Object_Class_Mutex
].
object_list
);
struct
rt_object_information
*
info
;
info
=
rt_object_get_information
(
RT_Object_Class_Mutex
);
return
_list_mutex
(
&
info
->
object_list
);
}
FINSH_FUNCTION_EXPORT
(
list_mutex
,
list
mutex
in
system
);
MSH_CMD_EXPORT
(
list_mutex
,
list
mutex
in
system
);
...
...
@@ -321,7 +333,10 @@ static long _list_mailbox(struct rt_list_node *list)
long
list_mailbox
(
void
)
{
return
_list_mailbox
(
&
rt_object_container
[
RT_Object_Class_MailBox
].
object_list
);
struct
rt_object_information
*
info
;
info
=
rt_object_get_information
(
RT_Object_Class_MailBox
);
return
_list_mailbox
(
&
info
->
object_list
);
}
FINSH_FUNCTION_EXPORT
(
list_mailbox
,
list
mail
box
in
system
);
MSH_CMD_EXPORT
(
list_mailbox
,
list
mail
box
in
system
);
...
...
@@ -370,7 +385,10 @@ static long _list_msgqueue(struct rt_list_node *list)
long
list_msgqueue
(
void
)
{
return
_list_msgqueue
(
&
rt_object_container
[
RT_Object_Class_MessageQueue
].
object_list
);
struct
rt_object_information
*
info
;
info
=
rt_object_get_information
(
RT_Object_Class_MessageQueue
);
return
_list_msgqueue
(
&
info
->
object_list
);
}
FINSH_FUNCTION_EXPORT
(
list_msgqueue
,
list
message
queue
in
system
);
MSH_CMD_EXPORT
(
list_msgqueue
,
list
message
queue
in
system
);
...
...
@@ -404,7 +422,10 @@ static long _list_memheap(struct rt_list_node *list)
long
list_memheap
(
void
)
{
return
_list_memheap
(
&
rt_object_container
[
RT_Object_Class_MemHeap
].
object_list
);
struct
rt_object_information
*
info
;
info
=
rt_object_get_information
(
RT_Object_Class_MemHeap
);
return
_list_memheap
(
&
info
->
object_list
);
}
FINSH_FUNCTION_EXPORT
(
list_memheap
,
list
memory
heap
in
system
);
MSH_CMD_EXPORT
(
list_memheap
,
list
memory
heap
in
system
);
...
...
@@ -453,7 +474,10 @@ static long _list_mempool(struct rt_list_node *list)
long
list_mempool
(
void
)
{
return
_list_mempool
(
&
rt_object_container
[
RT_Object_Class_MemPool
].
object_list
);
struct
rt_object_information
*
info
;
info
=
rt_object_get_information
(
RT_Object_Class_MemPool
);
return
_list_mempool
(
&
info
->
object_list
);
}
FINSH_FUNCTION_EXPORT
(
list_mempool
,
list
memory
pool
in
system
)
MSH_CMD_EXPORT
(
list_mempool
,
list
memory
pool
in
system
);
...
...
@@ -490,7 +514,10 @@ static long _list_timer(struct rt_list_node *list)
long
list_timer
(
void
)
{
return
_list_timer
(
&
rt_object_container
[
RT_Object_Class_Timer
].
object_list
);
struct
rt_object_information
*
info
;
info
=
rt_object_get_information
(
RT_Object_Class_Timer
);
return
_list_timer
(
&
info
->
object_list
);
}
FINSH_FUNCTION_EXPORT
(
list_timer
,
list
timer
in
system
);
MSH_CMD_EXPORT
(
list_timer
,
list
timer
in
system
);
...
...
@@ -550,7 +577,10 @@ static long _list_device(struct rt_list_node *list)
long
list_device
(
void
)
{
return
_list_device
(
&
rt_object_container
[
RT_Object_Class_Device
].
object_list
);
struct
rt_object_information
*
info
;
info
=
rt_object_get_information
(
RT_Object_Class_Device
);
return
_list_device
(
&
info
->
object_list
);
}
FINSH_FUNCTION_EXPORT
(
list_device
,
list
device
in
system
);
MSH_CMD_EXPORT
(
list_device
,
list
device
in
system
);
...
...
@@ -564,8 +594,10 @@ int list_module(void)
int
maxlen
;
struct
rt_module
*
module
;
struct
rt_list_node
*
list
,
*
node
;
struct
rt_object_information
*
info
;
list
=
&
rt_object_container
[
RT_Object_Class_Module
].
object_list
;
info
=
rt_object_get_information
(
RT_Object_Class_Module
);
list
=
&
info
->
object_list
;
maxlen
=
object_name_maxlen
(
list
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录