00001 /* 00002 * Operating system kernel abstraction -- linked lists. 00003 * 00004 * Copyright (C) 2009-2010 Cambridge Silicon Radio Ltd. 00005 * 00006 * Refer to LICENSE.txt included with this source code for details on 00007 * the license terms. 00008 */ 00009 #ifndef __OSKA_LIST_H 00010 #define __OSKA_LIST_H 00011 00012 #ifdef __cplusplus 00013 extern "C" { 00014 #endif 00015 00033 struct os_list_node { 00038 struct os_list_node *prev; 00043 struct os_list_node *next; 00044 }; 00045 00096 struct os_list { 00101 struct os_list_node head; 00102 }; 00103 00104 void os_list_init(struct os_list *list); 00105 int os_list_empty(struct os_list *list); 00106 void os_list_add_tail(struct os_list *list, struct os_list_node *node); 00107 void os_list_del(struct os_list_node *node); 00108 struct os_list_node *os_list_head(struct os_list *list); 00109 struct os_list_node *os_list_end(struct os_list *list); 00110 00111 #ifdef __cplusplus 00112 } /* extern "C" */ 00113 #endif 00114 00115 #endif /* #ifndef __OSKA_LIST_H */