git: 23ebeac87f40 - main - linuxkpi: Add `list_for_each_entry_from_rcu()` in <linux/rculist.h>
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 11 Nov 2022 17:57:49 UTC
The branch main has been updated by dumbbell (ports committer):
URL: https://cgit.FreeBSD.org/src/commit/?id=23ebeac87f400e1c35b18392f968f6fa38ae128d
commit 23ebeac87f400e1c35b18392f968f6fa38ae128d
Author: Jean-Sébastien Pédron <dumbbell@FreeBSD.org>
AuthorDate: 2022-11-11 17:42:10 +0000
Commit: Jean-Sébastien Pédron <dumbbell@FreeBSD.org>
CommitDate: 2022-11-11 17:42:10 +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
---
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)