aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/rcu/tasks.h
diff options
context:
space:
mode:
authorPaul E. McKenney <paulmck@kernel.org>2022-04-19 11:06:03 -0700
committerPaul E. McKenney <paulmck@kernel.org>2022-06-20 09:22:26 -0700
commit68cb47204db478302a37adb2aaa26a05882dbaa1 (patch)
treeeeb286f9a4450bf87852af1d8b9059ad46de5594 /kernel/rcu/tasks.h
parentrcu-tasks: Split rcu_tasks_one_gp() from rcu_tasks_kthread() (diff)
downloadlinux-dev-68cb47204db478302a37adb2aaa26a05882dbaa1.tar.xz
linux-dev-68cb47204db478302a37adb2aaa26a05882dbaa1.zip
rcu-tasks: Move synchronize_rcu_tasks_generic() down
This is strictly a code-motion commit that moves the synchronize_rcu_tasks_generic() down to where it can invoke rcu_tasks_one_gp() without the need for a forward declaration. Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Diffstat (limited to 'kernel/rcu/tasks.h')
-rw-r--r--kernel/rcu/tasks.h22
1 files changed, 11 insertions, 11 deletions
diff --git a/kernel/rcu/tasks.h b/kernel/rcu/tasks.h
index d7b12f524e81..ad993c4ed924 100644
--- a/kernel/rcu/tasks.h
+++ b/kernel/rcu/tasks.h
@@ -326,17 +326,6 @@ static void call_rcu_tasks_generic(struct rcu_head *rhp, rcu_callback_t func,
irq_work_queue(&rtpcp->rtp_irq_work);
}
-// Wait for a grace period for the specified flavor of Tasks RCU.
-static void synchronize_rcu_tasks_generic(struct rcu_tasks *rtp)
-{
- /* Complain if the scheduler has not started. */
- RCU_LOCKDEP_WARN(rcu_scheduler_active == RCU_SCHEDULER_INACTIVE,
- "synchronize_rcu_tasks called too soon");
-
- /* Wait for the grace period. */
- wait_rcu_gp(rtp->call_func);
-}
-
// RCU callback function for rcu_barrier_tasks_generic().
static void rcu_barrier_tasks_generic_cb(struct rcu_head *rhp)
{
@@ -558,6 +547,17 @@ static int __noreturn rcu_tasks_kthread(void *arg)
}
}
+// Wait for a grace period for the specified flavor of Tasks RCU.
+static void synchronize_rcu_tasks_generic(struct rcu_tasks *rtp)
+{
+ /* Complain if the scheduler has not started. */
+ RCU_LOCKDEP_WARN(rcu_scheduler_active == RCU_SCHEDULER_INACTIVE,
+ "synchronize_rcu_tasks called too soon");
+
+ /* Wait for the grace period. */
+ wait_rcu_gp(rtp->call_func);
+}
+
/* Spawn RCU-tasks grace-period kthread. */
static void __init rcu_spawn_tasks_kthread_generic(struct rcu_tasks *rtp)
{