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 provide list_for_each_...



details:   https://anonhg.NetBSD.org/src/rev/22217d468335
branches:  trunk
changeset: 1028148:22217d468335
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Sun Dec 19 01:58:55 2021 +0000

description:
provide list_for_each_entry_from (XXX needs review)


Author: Maya Rashish <maya%NetBSD.org@localhost>

diffstat:

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

diffs (21 lines):

diff -r f3ff7b012af9 -r 22217d468335 sys/external/bsd/common/include/linux/list.h
--- a/sys/external/bsd/common/include/linux/list.h      Sun Dec 19 01:58:47 2021 +0000
+++ b/sys/external/bsd/common/include/linux/list.h      Sun Dec 19 01:58:55 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: list.h,v 1.23 2021/12/19 01:57:57 riastradh Exp $      */
+/*     $NetBSD: list.h,v 1.24 2021/12/19 01:58:55 riastradh Exp $      */
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -291,6 +291,11 @@
                &(VAR)->FIELD != (HEAD);                                \
                (VAR) = list_prev_entry((VAR), FIELD))
 
+#define        list_for_each_entry_from(VAR, HEAD, FIELD)                      \
+       for (;                                                          \
+               (&(VAR)->FIELD != (HEAD));                              \
+               (VAR) = list_next_entry((VAR), FIELD))
+
 #define        list_for_each_entry_safe_from(VAR, NEXT, HEAD, FIELD)           \
        for (;                                                          \
                (&(VAR)->FIELD != (HEAD)) &&                            \



Home | Main Index | Thread Index | Old Index