From: Paul E. McKenney Date: Fri, 2 Aug 2024 00:34:23 +0000 (-0700) Subject: rcu: Provide rcu_barrier_cb_is_done() to check rcu_barrier() CBs X-Git-Tag: v6.12-rc1~166^2^6~17 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=54973cdd166b13195a99940cd21a827c3a99cac2;p=thirdparty%2Flinux.git rcu: Provide rcu_barrier_cb_is_done() to check rcu_barrier() CBs This commit provides a rcu_barrier_cb_is_done() function that returns true if the *rcu_barrier*() callback passed in is done. This will be used when printing grace-period debugging information. Signed-off-by: "Paul E. McKenney" Signed-off-by: Neeraj Upadhyay --- diff --git a/kernel/rcu/rcu.h b/kernel/rcu/rcu.h index 38238e595a61a..caaed27e476b2 100644 --- a/kernel/rcu/rcu.h +++ b/kernel/rcu/rcu.h @@ -255,6 +255,11 @@ static inline void debug_rcu_head_callback(struct rcu_head *rhp) kmem_dump_obj(rhp); } +static inline bool rcu_barrier_cb_is_done(struct rcu_head *rhp) +{ + return rhp->next == rhp; +} + extern int rcu_cpu_stall_suppress_at_boot; static inline bool rcu_stall_is_suppressed_at_boot(void)