aboutsummaryrefslogtreecommitdiff
path: root/sys/compat/linuxkpi/common/include/linux/list.h
diff options
context:
space:
mode:
authorJean-Sébastien Pédron <dumbbell@FreeBSD.org>2025-02-22 18:25:51 +0000
committerJean-Sébastien Pédron <dumbbell@FreeBSD.org>2025-03-20 19:43:44 +0000
commit09ba3ece18177c6ed96f8be75c6d648e9d20acdf (patch)
tree21765c56bc5b75e0fe5652348ada29fef3f349ca /sys/compat/linuxkpi/common/include/linux/list.h
parent039eac2463d7b0b1b863a57c78cb2e054c210197 (diff)
Diffstat (limited to 'sys/compat/linuxkpi/common/include/linux/list.h')
-rw-r--r--sys/compat/linuxkpi/common/include/linux/list.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/sys/compat/linuxkpi/common/include/linux/list.h b/sys/compat/linuxkpi/common/include/linux/list.h
index eecb517d780e..a6c74a324dac 100644
--- a/sys/compat/linuxkpi/common/include/linux/list.h
+++ b/sys/compat/linuxkpi/common/include/linux/list.h
@@ -234,6 +234,11 @@ list_del_init(struct list_head *entry)
for (; &p->field != (h); \
p = list_prev_entry(p, field))
+#define list_for_each_rcu(p, head) \
+ for (p = rcu_dereference((head)->next); \
+ p != (head); \
+ p = rcu_dereference((p)->next))
+
static inline void
list_add(struct list_head *new, struct list_head *head)
{