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 linux/list.h: Add list...



details:   https://anonhg.NetBSD.org/src/rev/b0f6f357e408
branches:  trunk
changeset: 1028656:b0f6f357e408
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Sun Dec 19 11:36:32 2021 +0000

description:
linux/list.h: Add list_safe_reset_next.

diffstat:

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

diffs (27 lines):

diff -r 98854c89921a -r b0f6f357e408 sys/external/bsd/common/include/linux/list.h
--- a/sys/external/bsd/common/include/linux/list.h      Sun Dec 19 11:36:25 2021 +0000
+++ b/sys/external/bsd/common/include/linux/list.h      Sun Dec 19 11:36:32 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: list.h,v 1.28 2021/12/19 11:32:08 riastradh Exp $      */
+/*     $NetBSD: list.h,v 1.29 2021/12/19 11:36:32 riastradh Exp $      */
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -107,7 +107,6 @@
 list_is_first(const struct list_head *entry, const struct list_head *head)
 {
        return head == entry->prev;
-       
 }
 
 static inline bool
@@ -273,6 +272,9 @@
                ((VAR) != (HEAD)) && ((NEXT) = list_next((VAR)), 1);    \
                (VAR) = (NEXT))
 
+#define        list_safe_reset_next(VAR, NEXT, FIELD)                          \
+       (NEXT) = list_next_entry(VAR, FIELD)
+
 #define        list_for_each_entry(VAR, HEAD, FIELD)                           \
        for ((VAR) = list_entry(list_first((HEAD)), typeof(*(VAR)), FIELD); \
                &(VAR)->FIELD != (HEAD);                                \



Home | Main Index | Thread Index | Old Index