// wdm.h
VOID KeSrcuSynchronize(
[in] PKE_SRCU Rcu
);
View the official Windows Driver Kit DDI referenceNo description available.
The KeSrcuSynchronize routine waits until all currently active read-side critical sections for a Sleepable Read-Copy-Update (SRCU) partition have exited.
Rcu [in]A pointer to the SRCU instance that was previously allocated by KeSrcuAllocate.
KeSrcuSynchronize implements the "synchronize" operation for SRCU, which starts a grace period and waits for all currently active readers to exit their critical sections. This function is essential for safe memory reclamation and data structure updates.
The grace period semantics are as follows:
Call this function only at IRQL < DISPATCH_LEVEL since it may block. This function can sleep, making it suitable for pageable code. Don't call this function from within an SRCU read-side critical section.
The typical writer pattern is as follows:
The function ensures that no readers are accessing the data when it returns, making it safe to perform updates or memory reclamation.