⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ssp_list.c

📁 abstract rtos
💻 C
字号:
#ifdef __cplusplusextern "C"{#endif #include "syscfg.h"#include "sys/sys_pub.h"#include "aos.h"static AOS_INLINE void __list_add(struct aos_list *new_node,			      struct aos_list *prev,			      struct aos_list *next){	next->prev = new_node;	new_node->next = next;	new_node->prev = prev;	prev->next = new_node;}static AOS_INLINE void __list_del(struct aos_list *prev, struct aos_list *next){	next->prev = prev;	prev->next = next;}VOID aos_list_init( struct aos_list *list ){    if(AOS_ADDR_INVALID(list))    {        AOS_ASSERT(0);        return;    }    list->prev = list;    list->next = list;}VOID aos_list_add_head( struct aos_list *list, struct aos_list *node ){    if(AOS_ADDR_INVALID(list)    || AOS_ADDR_INVALID(node))    {        AOS_ASSERT(0);        return;    }	__list_add(node, list, list->next);}VOID aos_list_add_tail( struct aos_list *list, struct aos_list *node ){    if(AOS_ADDR_INVALID(list)    || AOS_ADDR_INVALID(node))    {        AOS_ASSERT(0);        return;    }	__list_add(node, list->prev, list);}struct aos_list *aos_list_fetch( struct aos_list *list ){    struct aos_list *node = NULL;    if(AOS_ADDR_INVALID(list))    {        AOS_ASSERT(0);        return NULL;    }    if( list->next != list )    {        node = list->next;            	__list_del(node->prev, node->next);    	node->next = NULL;    	node->prev = NULL;    }    return node;}VOID aos_list_delete( struct aos_list *node ){    if(AOS_ADDR_INVALID(node))    {        AOS_ASSERT(0);        return;    }    	__list_del(node->prev, node->next);	node->next = NULL;	node->prev = NULL;}#ifdef __cplusplus}#endif 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -