/* * Node is added to the list of the last surface, also both front */ static inline void list_add_node_tail(list_head_t *node, list_head_t **head) { if (*head == NULL) *head = node; else ___list_add(node, (*head)->prev, *head); }
static __s32 List_Assert_Sprite_Block(__u32 sel, list_head_t *dst_node, list_head_t *node) { list_head_t *next_node = NULL; if (gsprite[sel].header == NULL) { gsprite[sel].header = node; return DIS_SUCCESS; } else if (dst_node == NULL) { /* asset to the front of the list */ __s32 id = 0; __s32 id_tmp = 0; next_node = gsprite[sel].header; id = node->data->id; node->data->id = 0; next_node->data->id = id; id_tmp = gsprite[sel].sprite_hid[0]; gsprite[sel].sprite_hid[0] = gsprite[sel].sprite_hid[id]; gsprite[sel].sprite_hid[id] = id_tmp; gsprite[sel].header = node; dst_node = next_node->prev; } else next_node = dst_node->next; ___list_add(node, dst_node, next_node); return DIS_SUCCESS; }
//将node添加到list的最后面,也既其前面 static __inline void list_add_node_tail(list_head_t *node, list_head_t **head) { if(*head == NULL) { *head = node; } else { ___list_add(node, (*head)->prev, *head); } }