aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/rcu/sync.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/rcu/sync.c')
-rw-r--r--kernel/rcu/sync.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/kernel/rcu/sync.c b/kernel/rcu/sync.c
index be922c9f3d37..50d1861f7759 100644
--- a/kernel/rcu/sync.c
+++ b/kernel/rcu/sync.c
@@ -68,6 +68,8 @@ void rcu_sync_lockdep_assert(struct rcu_sync *rsp)
68 RCU_LOCKDEP_WARN(!gp_ops[rsp->gp_type].held(), 68 RCU_LOCKDEP_WARN(!gp_ops[rsp->gp_type].held(),
69 "suspicious rcu_sync_is_idle() usage"); 69 "suspicious rcu_sync_is_idle() usage");
70} 70}
71
72EXPORT_SYMBOL_GPL(rcu_sync_lockdep_assert);
71#endif 73#endif
72 74
73/** 75/**
@@ -83,6 +85,18 @@ void rcu_sync_init(struct rcu_sync *rsp, enum rcu_sync_type type)
83} 85}
84 86
85/** 87/**
88 * Must be called after rcu_sync_init() and before first use.
89 *
90 * Ensures rcu_sync_is_idle() returns false and rcu_sync_{enter,exit}()
91 * pairs turn into NO-OPs.
92 */
93void rcu_sync_enter_start(struct rcu_sync *rsp)
94{
95 rsp->gp_count++;
96 rsp->gp_state = GP_PASSED;
97}
98
99/**
86 * rcu_sync_enter() - Force readers onto slowpath 100 * rcu_sync_enter() - Force readers onto slowpath
87 * @rsp: Pointer to rcu_sync structure to use for synchronization 101 * @rsp: Pointer to rcu_sync structure to use for synchronization
88 * 102 *