rt-thread线程源码分析(七)
ion->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)//比较名字
{ www.2cto.com
/* leave critical */
if (rt_thread_self() != RT_NULL)
rt_exit_critical();//退出临界区
return (rt_thread_t)object;//返回内核对象
}
}
/* leave critical */
if (rt_thread_self() != RT_NULL)
rt_exit_critical();//退出临界区
/* not found */
return RT_NULL;//返回未找到
}