list->prev = item;
}
-static inline bool list_empty(const struct list_head *list);
+static inline bool list_is_empty(const struct list_head *list);
static inline void list_replace(struct list_head *from, struct list_head *to)
{
- if (list_empty(from)) {
+ if (list_is_empty(from)) {
list_inithead(to);
} else {
to->prev = from->prev;
item->prev = item;
}
-static inline bool list_empty(const struct list_head *list)
+static inline bool list_is_empty(const struct list_head *list)
{
return list->next == list;
}
static inline void list_splice(struct list_head *src, struct list_head *dst)
{
- if (list_empty(src))
+ if (list_is_empty(src))
return;
src->next->prev = dst;
static inline void list_splicetail(struct list_head *src, struct list_head *dst)
{
- if (list_empty(src))
+ if (list_is_empty(src))
return;
src->prev->next = dst;
assert(node->next->prev == node && node->prev->next == node);
}
-#define LIST_DEL(__item) list_del(__item)
-
#define LIST_ENTRY(__type, __item, __field) \
((__type *)(((char *)(__item)) - offsetof(__type, __field)))
-#define LIST_IS_EMPTY(__list) \
- ((__list)->next == (__list))
-
/**
* Cast from a pointer to a member of a struct back to the containing struct.
*