Module Name:    src
Committed By:   riastradh
Date:           Sun Dec 19 01:58:55 UTC 2021

Modified Files:
        src/sys/external/bsd/common/include/linux: list.h

Log Message:
provide list_for_each_entry_from (XXX needs review)

Author: Maya Rashish <m...@netbsd.org>


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 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.23 src/sys/external/bsd/common/include/linux/list.h:1.24
--- src/sys/external/bsd/common/include/linux/list.h:1.23	Sun Dec 19 01:57:57 2021
+++ src/sys/external/bsd/common/include/linux/list.h	Sun Dec 19 01:58:55 2021
@@ -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 @@ list_del_init(struct list_head *node)
 		&(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)) &&				\

Reply via email to