summaryrefslogtreecommitdiff
path: root/include/linux/timerqueue.h
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2026-04-15 18:56:02 +0300
committerPablo Neira Ayuso <pablo@netfilter.org>2026-04-21 13:48:44 +0300
commitf902877b635551513729bdf9a8d1422c4aab7741 (patch)
treec778df397796193fbca14773ceeb25c763fee0f4 /include/linux/timerqueue.h
parentf3224ee463f8f6f6ced7dcdf6081add4f8128527 (diff)
downloadlinux-f902877b635551513729bdf9a8d1422c4aab7741.tar.xz
rculist: add list_splice_rcu() for private lists
This patch adds a helper function, list_splice_rcu(), to safely splice a private (non-RCU-protected) list into an RCU-protected list. The function ensures that only the pointer visible to RCU readers (prev->next) is updated using rcu_assign_pointer(), while the rest of the list manipulations are performed with regular assignments, as the source list is private and not visible to concurrent RCU readers. This is useful for moving elements from a private list into a global RCU-protected list, ensuring safe publication for RCU readers. Subsystems with some sort of batching mechanism from userspace can benefit from this new function. The function __list_splice_rcu() has been added for clarity and to follow the same pattern as in the existing list_splice*() interfaces, where there is a check to ensure that the list to splice is not empty. Note that __list_splice_rcu() has no documentation for this reason. Reviewed-by: Paul E. McKenney <paulmck@kernel.org> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'include/linux/timerqueue.h')
0 files changed, 0 insertions, 0 deletions