diff options
author | Jean-Sébastien Pédron <dumbbell@FreeBSD.org> | 2022-11-11 17:42:10 +0000 |
---|---|---|
committer | Jean-Sébastien Pédron <dumbbell@FreeBSD.org> | 2022-11-11 17:42:10 +0000 |
commit | 23ebeac87f400e1c35b18392f968f6fa38ae128d (patch) | |
tree | e3e5f863c0ae7696e6e2828100da8f9c415df21e /sys/compat/linuxkpi/common | |
parent | d3584f92835a07d76bc579168ac5fdc3e020d5f0 (diff) | |
download | src-23ebeac87f400e1c35b18392f968f6fa38ae128d.tar.gz src-23ebeac87f400e1c35b18392f968f6fa38ae128d.zip |
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
Diffstat (limited to 'sys/compat/linuxkpi/common')
-rw-r--r-- | sys/compat/linuxkpi/common/include/linux/rculist.h | 5 |
1 files changed, 5 insertions, 0 deletions
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) |