提交 157bc5f2 编写于 作者: B bernard.xiong

remove rt_object_find function.

git-svn-id: https://rt-thread.googlecode.com/svn/trunk@693 bbd45198-f89e-11dd-88c7-29a3b14d5316
上级 1cbde10e
...@@ -390,10 +390,34 @@ void rt_module_unload(struct rt_module* module) ...@@ -390,10 +390,34 @@ void rt_module_unload(struct rt_module* module)
rt_module_t rt_module_find(char* name) rt_module_t rt_module_find(char* name)
{ {
struct rt_module* module; struct rt_object_information *information;
module = (struct rt_module*)rt_object_find(RT_Object_Class_Module, name); struct rt_object* object;
struct rt_list_node* node;
return module; extern struct rt_object_information rt_object_container[];
/* enter critical */
rt_enter_critical();
/* try to find device object */
information = &rt_object_container[RT_Object_Class_Thread];
for (node = information->object_list.next; node != &(information->object_list); node = node->next)
{
object = rt_list_entry(node, struct rt_object, list);
if (rt_strncmp(object->name, name, RT_NAME_MAX) == 0)
{
/* leave critical */
rt_exit_critical();
return (rt_module_t)object;
}
}
/* leave critical */
rt_exit_critical();
/* not found */
return RT_NULL;
} }
#endif #endif
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册