Lines Matching refs:list
190 #define OSAL_LIST_SPLICE_INIT(new_list, list) nothing argument
191 #define OSAL_LIST_SPLICE_TAIL_INIT(new_list, list) nothing argument
202 #define OSAL_LIST_INIT(list) \ argument
204 (list)->head = NULL; \
205 (list)->tail = NULL; \
206 (list)->cnt = 0; \
209 #define OSAL_LIST_PUSH_HEAD(entry, list) \ argument
212 (entry)->next = (list)->head; \
213 if ((list)->tail == (osal_list_entry_t *)0) { \
214 (list)->tail = (entry); \
216 (list)->head->prev = (entry); \
218 (list)->head = (entry); \
219 (list)->cnt++; \
222 #define OSAL_LIST_PUSH_TAIL(entry, list) \ argument
225 (entry)->prev = (list)->tail; \
226 if ((list)->tail) { \
227 (list)->tail->next = (entry); \
229 (list)->head = (entry); \
231 (list)->tail = (entry); \
232 (list)->cnt++; \
235 #define OSAL_LIST_FIRST_ENTRY(list, type, field) \ argument
236 (type *)((list)->head)
238 #define OSAL_LIST_REMOVE_ENTRY(entry, list) \ argument
240 if ((list)->head == (entry)) { \
241 if ((list)->head) { \
242 (list)->head = (list)->head->next; \
243 if ((list)->head) { \
244 (list)->head->prev = (osal_list_entry_t *)0;\
246 (list)->tail = (osal_list_entry_t *)0; \
248 (list)->cnt--; \
250 } else if ((list)->tail == (entry)) { \
251 if ((list)->tail) { \
252 (list)->tail = (list)->tail->prev; \
253 if ((list)->tail) { \
254 (list)->tail->next = (osal_list_entry_t *)0;\
256 (list)->head = (osal_list_entry_t *)0; \
258 (list)->cnt--; \
263 (list)->cnt--; \
267 #define OSAL_LIST_IS_EMPTY(list) \ argument
268 ((list)->cnt == 0)
275 #define OSAL_LIST_FOR_EACH_ENTRY(entry, list, field, type) \ argument
276 for (entry = OSAL_LIST_FIRST_ENTRY(list, type, field); \
280 #define OSAL_LIST_FOR_EACH_ENTRY_SAFE(entry, tmp_entry, list, field, type) \ argument
281 for (entry = OSAL_LIST_FIRST_ENTRY(list, type, field), \
288 #define OSAL_LIST_INSERT_ENTRY_AFTER(new_entry, entry, list) \ argument
289 OSAL_LIST_PUSH_HEAD(new_entry, list)