aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorPaul E. McKenney <paulmck@kernel.org>2024-08-01 17:34:23 -0700
committerNeeraj Upadhyay <neeraj.upadhyay@kernel.org>2024-08-14 16:49:56 +0530
commit54973cdd166b13195a99940cd21a827c3a99cac2 (patch)
tree6b2f7c6b7683f2ace1cbb452c41946454b2852f3
parentrcu/tasks: Update rtp->tasks_gp_seq comment (diff)
downloadwireguard-linux-54973cdd166b13195a99940cd21a827c3a99cac2.tar.xz
wireguard-linux-54973cdd166b13195a99940cd21a827c3a99cac2.zip
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" <paulmck@kernel.org> Signed-off-by: Neeraj Upadhyay <neeraj.upadhyay@kernel.org>
-rw-r--r--kernel/rcu/rcu.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/kernel/rcu/rcu.h b/kernel/rcu/rcu.h
index 38238e595a61..caaed27e476b 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)