Module Name: src
Committed By: riastradh
Date: Mon Aug 27 07:33:09 UTC 2018
Modified Files:
src/sys/external/bsd/common/include/linux: list.h
Log Message:
Implement list_splice_tail_init.
To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/sys/external/bsd/common/include/linux/list.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/external/bsd/common/include/linux/list.h
diff -u src/sys/external/bsd/common/include/linux/list.h:1.14 src/sys/external/bsd/common/include/linux/list.h:1.15
--- src/sys/external/bsd/common/include/linux/list.h:1.14 Mon Aug 27 07:21:59 2018
+++ src/sys/external/bsd/common/include/linux/list.h Mon Aug 27 07:33:09 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: list.h,v 1.14 2018/08/27 07:21:59 riastradh Exp $ */
+/* $NetBSD: list.h,v 1.15 2018/08/27 07:33:09 riastradh Exp $ */
/*-
* Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -167,6 +167,15 @@ list_splice_tail(const struct list_head
}
static inline void
+list_splice_tail_init(struct list_head *list, struct list_head *head)
+{
+ if (!list_empty(list)) {
+ __list_splice_between(head->prev, list, head);
+ INIT_LIST_HEAD(list);
+ }
+}
+
+static inline void
list_move(struct list_head *node, struct list_head *head)
{
list_del(node);