summaryrefslogtreecommitdiff
path: root/src/thread.c
diff options
context:
space:
mode:
authorBernard Xiong <[email protected]>2017-12-13 14:14:40 +0800
committerGitHub <[email protected]>2017-12-13 14:14:40 +0800
commit6962bd1f1e3a7e3197170c74e4909035e7fb3255 (patch)
tree0fdcac7ad204b43d006b2d78348ab74a03efb56a /src/thread.c
parentf4353bec2f07aaa00b9d958724ae649b0734f3c4 (diff)
parent37b8532216879f08d3d7a4ca5b351eecb053b830 (diff)
Merge pull request #1101 from BernardXiong/master
[Kernel] Use rt_object_get_information to get object chain
Diffstat (limited to 'src/thread.c')
-rw-r--r--src/thread.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/thread.c b/src/thread.c
index c39d689e0f..3a3e55302e 100644
--- a/src/thread.c
+++ b/src/thread.c
@@ -750,14 +750,13 @@ rt_thread_t rt_thread_find(char *name)
struct rt_object *object;
struct rt_list_node *node;
- extern struct rt_object_information rt_object_container[];
-
/* enter critical */
if (rt_thread_self() != RT_NULL)
rt_enter_critical();
/* try to find device object */
- information = &rt_object_container[RT_Object_Class_Thread];
+ information = rt_object_get_information(RT_Object_Class_Thread);
+ RT_ASSERT(information != RT_NULL);
for (node = information->object_list.next;
node != &(information->object_list);
node = node->next)