Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/external/bsd/common/include/linux list_bulk_move_tail



details:   https://anonhg.NetBSD.org/src/rev/1c49fc520340
branches:  trunk
changeset: 1028334:1c49fc520340
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Sun Dec 19 10:39:35 2021 +0000

description:
list_bulk_move_tail

diffstat:

 sys/external/bsd/common/include/linux/list.h |  17 ++++++++++++++++-
 1 files changed, 16 insertions(+), 1 deletions(-)

diffs (31 lines):

diff -r 17b64a6822dc -r 1c49fc520340 sys/external/bsd/common/include/linux/list.h
--- a/sys/external/bsd/common/include/linux/list.h      Sun Dec 19 10:39:28 2021 +0000
+++ b/sys/external/bsd/common/include/linux/list.h      Sun Dec 19 10:39:35 2021 +0000
@@ -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 @@
 }
 
 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;



Home | Main Index | Thread Index | Old Index