HomeFreeBSD

LinuxKPI: Add compiler barriers to list_for_each_entry_lockless macro

Description

LinuxKPI: Add compiler barriers to list_for_each_entry_lockless macro

so this list-traversal primitive may safely run concurrently with the
_rcu list-mutation primitives such as list_add_rcu() as long as the
traversal is guarded by rcu_read_lock().

Do it by reusing the "list_for_each_entry_rcu" macro which does the same.
On Linux it implements some additional lockdep stuff which we skip.

Also move the macro to linux/rculist.h where it resides on Linux.

Reviewed by: hselasky
Differential revision: https://reviews.freebsd.org/D30795

Details

Provenance
wulfAuthored on Jul 5 2021, 12:19 AM
Reviewer
hselasky
Differential Revision
D30795: LinuxKPI: Add compiler barriers to list_for_each_entry_lockless macro
Parents
rGc77ec79b57aa: LinuxKPI: Change flags parameter type of atomic_dec_and_lock_irqsave
Branches
Unknown
Tags
Unknown