From: Mathieu Desnoyers Date: Fri, 10 Feb 2023 17:24:44 +0000 (-0500) Subject: Document grace period polling in rcu-api.md X-Git-Tag: v0.14.0~6 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=a88a3a8607e2aa7bbd5848f5d1f80c8cb0d55715;p=userspace-rcu.git Document grace period polling in rcu-api.md Signed-off-by: Mathieu Desnoyers Change-Id: I74631072d19cbe1212be6d1ab4f08778d59f67dd --- diff --git a/doc/rcu-api.md b/doc/rcu-api.md index e8ec022..4163eef 100644 --- a/doc/rcu-api.md +++ b/doc/rcu-api.md @@ -60,6 +60,26 @@ started: this is not a reader-writer lock. The duration actually waited is called an RCU grace period. +```c +struct urcu_gp_poll_state start_poll_synchronize_rcu(void); +``` + +Start polling on grace period. The returned poll state should be +queried using `poll_state_synchronize_rcu` to check whether the +grace period has completed. + +`start_poll_synchronize_rcu` should be called from registered RCU +read-side threads. For the QSBR flavor, the caller should be online. + + +```c +bool poll_state_synchronize_rcu(struct urcu_gp_poll_state state); +``` + +Poll the grace period state. Return true if quiescence was reached since +the grace period was started, return false otherwise. + + ```c void call_rcu(struct rcu_head *head, void (*func)(struct rcu_head *head));