summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorBrian Behlendorf <behlendorf1@llnl.gov>2009-03-19 21:40:07 -0700
committerBrian Behlendorf <behlendorf1@llnl.gov>2009-03-19 21:40:07 -0700
commit759dfe7d4366c60cba2693902396fc70b06d176f (patch)
tree4c85d0e5405ecc44167a8b2b91a6a46e04fac851 /include
parentc388a3ab26bdd19a10c02dbb24981e6f482d0958 (diff)
Add list_move_tail() function.
Diffstat (limited to 'include')
-rw-r--r--include/sys/list.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/sys/list.h b/include/sys/list.h
index 0592d5c1d..0a4cf1183 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 */