Changes in kernel/generic/include/adt/list.h [7856d09:07525cd] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/include/adt/list.h
r7856d09 r07525cd 37 37 #define KERN_LIST_H_ 38 38 39 #include <debug.h>40 39 #include <typedefs.h> 41 40 #include <trace.h> … … 74 73 _link != &(list).head; _link = _link->next) 75 74 76 #define list_foreach_rev(list, member, itype, iterator) \77 for (itype *iterator = NULL; iterator == NULL; iterator = (itype *) 1) \78 for (link_t *_link = (list).head.prev; \79 iterator = list_get_instance(_link, itype, member), \80 _link != &(list).head; _link = _link->prev)81 82 75 #define assert_link_not_used(link) \ 83 ASSERT( !link_used(link))76 ASSERT(((link)->prev == NULL) && ((link)->next == NULL)) 84 77 85 78 /** Initialize doubly-linked circular list link … … 326 319 } 327 320 328 /** Determine if link is used.329 *330 * @param link Link331 * @return @c true if link is used, @c false if not.332 */333 static inline bool link_used(link_t *link)334 {335 if (link->prev == NULL && link->next == NULL)336 return false;337 338 ASSERT(link->prev != NULL && link->next != NULL);339 return true;340 }341 342 321 extern int list_member(const link_t *, const list_t *); 343 322 extern void list_concat(list_t *, list_t *);
Note:
See TracChangeset
for help on using the changeset viewer.