diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/list.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/list.h b/include/list.h index a59ca00..cccc3c3 100644 --- a/include/list.h +++ b/include/list.h @@ -90,4 +90,16 @@ static inline void list_del_init(struct list_head *entry) INIT_LIST_HEAD(entry); } +/** + * list_move_tail - delete from one list and add as another's tail + * @list: the entry to move + * @head: the head that will follow our entry + */ +static inline void list_move_tail(struct list_head *list, + struct list_head *head) +{ + __list_del(list->prev, list->next); + list_add_tail(list, head); +} + #endif |