From: Brian Behlendorf Date: Fri, 20 Mar 2009 04:40:07 +0000 (-0700) Subject: Add list_move_tail() function. X-Git-Tag: spl-0.4.3~1 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=759dfe7d4366c60cba2693902396fc70b06d176f;p=spl Add list_move_tail() function. --- diff --git a/include/sys/list.h b/include/sys/list.h index 0592d5c..0a4cf11 100644 --- a/include/sys/list.h +++ b/include/sys/list.h @@ -170,4 +170,12 @@ list_link_active(list_node_t *node) return (node->next != LIST_POISON1) && (node->prev != LIST_POISON2); } +static inline void +spl_list_move_tail(list_t *dst, list_t *src) +{ + list_splice_init(&src->list_head, dst->list_head.prev); +} + +#define list_move_tail(dst, src) spl_list_move_tail(dst, src) + #endif /* SPL_LIST_H */