Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 24 Jan 2023 08:54:03 GMT
From:      Emmanuel Vadot <manu@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: d0e22c1cf1d7 - stable/13 - linuxkpi: Add `list_for_each_entry_from_rcu()` in <linux/rculist.h>
Message-ID:  <202301240854.30O8s3FC035968@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by manu:

URL: https://cgit.FreeBSD.org/src/commit/?id=d0e22c1cf1d7c8e847f719e8c8d35aaf4f042d21

commit d0e22c1cf1d7c8e847f719e8c8d35aaf4f042d21
Author:     Jean-Sébastien Pédron <dumbbell@FreeBSD.org>
AuthorDate: 2022-11-11 17:42:10 +0000
Commit:     Emmanuel Vadot <manu@FreeBSD.org>
CommitDate: 2023-01-24 09:08:00 +0000

    linuxkpi: Add `list_for_each_entry_from_rcu()` in <linux/rculist.h>
    
    Reviewed by:    manu
    Approved by:    manu
    Differential Revision:  https://reviews.freebsd.org/D36967
    
    (cherry picked from commit 23ebeac87f400e1c35b18392f968f6fa38ae128d)
---
 sys/compat/linuxkpi/common/include/linux/rculist.h | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/sys/compat/linuxkpi/common/include/linux/rculist.h b/sys/compat/linuxkpi/common/include/linux/rculist.h
index e0c3f79d9e5a..305c425574b4 100644
--- a/sys/compat/linuxkpi/common/include/linux/rculist.h
+++ b/sys/compat/linuxkpi/common/include/linux/rculist.h
@@ -44,6 +44,11 @@
 	     &(pos)->member != (head);					\
 	     pos = list_entry_rcu((pos)->member.next, typeof(*(pos)), member))
 
+#define	list_for_each_entry_from_rcu(pos, head, member) \
+	for (; \
+	     &(pos)->member != (head);					\
+	     pos = list_entry_rcu((pos)->member.next, typeof(*(pos)), member))
+
 #define	list_for_each_entry_lockless(pos, head, member) \
 	list_for_each_entry_rcu(pos, head, member)
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202301240854.30O8s3FC035968>