Module Name: src Committed By: riastradh Date: Sun Dec 19 10:39:35 UTC 2021
Modified Files: src/sys/external/bsd/common/include/linux: list.h Log Message: list_bulk_move_tail To generate a diff of this commit: cvs rdiff -u -r1.25 -r1.26 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.25 src/sys/external/bsd/common/include/linux/list.h:1.26 --- src/sys/external/bsd/common/include/linux/list.h:1.25 Sun Dec 19 10:39:28 2021 +++ src/sys/external/bsd/common/include/linux/list.h Sun Dec 19 10:39:35 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: list.h,v 1.25 2021/12/19 10:39:28 riastradh Exp $ */ +/* $NetBSD: list.h,v 1.26 2021/12/19 10:39:35 riastradh Exp $ */ /*- * Copyright (c) 2013 The NetBSD Foundation, Inc. @@ -214,6 +214,21 @@ list_move_tail(struct list_head *node, s } static inline void +list_bulk_move_tail(struct list_head *head, struct list_head *first, + struct list_head *last) +{ + + first->prev->next = last->next; + last->next->prev = first->prev; + + head->prev->next = first; + first->prev = head->prev; + + last->next = head; + head->prev = last; +} + +static inline void list_replace(struct list_head *old, struct list_head *new) { new->prev = old->prev;