提交 a6b44406 编写于 作者: D dzzxzz@gmail.com

fixed the coding style in object.c

git-svn-id: https://rt-thread.googlecode.com/svn/trunk@2521 bbd45198-f89e-11dd-88c7-29a3b14d5316
上级 1cffb60c
......@@ -176,20 +176,24 @@ void rt_system_object_init(void)
* @param type the type of object
* @return the object type information or RT_NULL
*/
struct rt_object_information *rt_object_get_information(enum rt_object_class_type type)
struct rt_object_information *
rt_object_get_information(enum rt_object_class_type type)
{
return &rt_object_container[type];
}
RTM_EXPORT(rt_object_get_information);
/**
* This function will initialize an object and add it to object system management.
* This function will initialize an object and add it to object system
* management.
*
* @param object the specified object to be initialized.
* @param type the object type.
* @param name the object name. In system, the object's name must be unique.
*/
void rt_object_init(struct rt_object *object, enum rt_object_class_type type, const char *name)
void rt_object_init(struct rt_object *object,
enum rt_object_class_type type,
const char *name)
{
register rt_base_t temp;
struct rt_object_information *information;
......@@ -266,7 +270,10 @@ rt_object_t rt_object_allocate(enum rt_object_class_type type, const char *name)
RT_DEBUG_NOT_IN_INTERRUPT;
#ifdef RT_USING_MODULE
/* get module object information, module object should be managed by kernel object container */
/*
* get module object information,
* module object should be managed by kernel object container
*/
information = (rt_module_self() != RT_NULL && (type != RT_Object_Class_Module)) ?
&rt_module_self()->module_object[type] : &rt_object_container[type];
#else
......@@ -402,7 +409,9 @@ rt_object_t rt_object_find(const char *name, rt_uint8_t type)
/* try to find object */
information = &rt_object_container[type];
for (node = information->object_list.next; node != &(information->object_list); node = node->next)
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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册