diff options
author | Felix Fietkau <nbd@openwrt.org> | 2010-12-29 01:59:06 +0300 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2010-12-29 01:59:06 +0300 |
commit | 82ce342055ec8f7a0235d46f5332014eb3f69216 (patch) | |
tree | f1e06194a21de811d0b28fd93c8d50f37e47d139 /list.h | |
parent | cd086c7c1558eb5816711f4fdc6e21524a01ddca (diff) |
merge an avl list implementation (imported from PacketBB)
Diffstat (limited to 'list.h')
-rw-r--r-- | list.h | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -167,6 +167,17 @@ static inline void list_move_tail(struct list_head *list, } /** + * list_is_first - tests whether @list is the first entry in list @head + * @list: the entry to test + * @head: the head of the list + */ +static inline int list_is_first(const struct list_head *list, + const struct list_head *head) +{ + return list->prev == head; +} + +/** * list_is_last - tests whether @list is the last entry in list @head * @list: the entry to test * @head: the head of the list |