/*insert object into information object list*/rt_list_insert_after(&(information->object_list), &(object->list)); 在下面这段代码中information->object_list 是记录RT_Object_Class_Thread类型对象指针的链表。 object = rt_list_entry(
/* check object type to avoid re-initialization */ /* 进入临界区保护 */ rt_enter_critical(); /* try to find object */ for (node = information->object_list.next; node != &(information->object_list); node = node->next) { struct rt_object *obj; obj = rt_list_entry(node, struc...
obj =rt_list_entry(node,structrt_object, list);if(obj)/* skip warning when disable debug */{RT_ASSERT(obj != object); } }/* 离开临界区 */rt_exit_critical();/* 初始化对象参数,并置为静态标记 */object->type=type| RT_Object_Class_Static;rt_strncpy(object->name, name, RT_NAME_M...
node = node->next) {structrt_object *obj; obj = rt_list_entry(node,structrt_object, list);if(obj)/* skip warning when disable debug */{ RT_ASSERT(obj != object); } }/* 离开临界区 */rt_exit_critical();/* 初始化对象参数,并置为静态标记 */object->type=type| RT_Object_Class_...
rt_list_t list; /**< the object list */ rt_list_t tlist; /**< the thread list *///线程链表,一般用作就绪队列元素节点 /* stack point and entry */ void *sp; /**< stack point *///栈指针 void *entry; /**< entry *///入口函数 ...
typedef struct rt_list_node rt_list_t; void rt_system_timer_init(void) { int i; /*结构体数组,在初始化的时候只有一个元素,就是链表头,后期添加定时器,按定时器定时时间顺序进行排序插入*/ for (i = 0; i < sizeof(rt_timer_list) / sizeof(rt_timer_list[0]); i++) ...
object_list)) { obj = rt_list_entry(node, struct rt_object, list); //rt_kprintf("Object name: %s\n", obj->name); } } long syz_mp_complex_usage(volatile int mp_handle) { // Attempt to allocate multiple blocks void *blocks[10]; for (int i = 0; i < 10; i++) { blocks...
Expand Down Expand Up @@ -256,7 +256,7 @@ static void show_wait_queue(struct rt_list_node *list) for (node = list->next; node != list; node = node->next) { thread = rt_list_entry(node, struct rt_thread, tlist); rt_kprintf("%.*s", RT_NAME_MAX, thread->name); rt_kp...
{ struct rt_object *obj; obj = rt_list_entry(node, struct rt_object, list); if (obj) /* skip warning when disable debug */ { RT_ASSERT(obj != object); } } /* 离开临界区 */ rt_exit_critical(); /* 初始化对象参数,并置为静态标记 */ object-》type = type | RT_Object_Class...
structrt_thread { /* rt object */ charname[RT_NAME_MAX];/**< the name of thread */ rt_uint8_ttype;/**< type of object */ rt_uint8_tflags;/**< thread's flags */ #ifdefRT_USING_MODULE void*module_id;/**< id of application module */ ...