class SimpleGenerational
Defined at line 54 of file ../../zircon/kernel/lib/mmu_rcu/include/lib/mmu_rcu/simple_generational_rcu.h
Public Methods
void SimpleGenerational ()
Defined at line 56 of file ../../zircon/kernel/lib/mmu_rcu/include/lib/mmu_rcu/simple_generational_rcu.h
void ~SimpleGenerational ()
Defined at line 57 of file ../../zircon/kernel/lib/mmu_rcu/include/lib/mmu_rcu/simple_generational_rcu.h
void SimpleGenerational (const SimpleGenerational & )
Defined at line 61 of file ../../zircon/kernel/lib/mmu_rcu/include/lib/mmu_rcu/simple_generational_rcu.h
void SimpleGenerational (SimpleGenerational && )
Defined at line 62 of file ../../zircon/kernel/lib/mmu_rcu/include/lib/mmu_rcu/simple_generational_rcu.h
SimpleGenerational & operator= (const SimpleGenerational & )
Defined at line 63 of file ../../zircon/kernel/lib/mmu_rcu/include/lib/mmu_rcu/simple_generational_rcu.h
SimpleGenerational & operator= (SimpleGenerational && )
Defined at line 64 of file ../../zircon/kernel/lib/mmu_rcu/include/lib/mmu_rcu/simple_generational_rcu.h
uint32_t ReadLock ()
Begins a read critical section, returning the generation of this reader. The generation can be
considered opaque data that must be returned to ReadUnlock.
Must be called with interrupts disabled, and interrupts must stay disabled until calling
ReadUnlock.
Although this provides a similar memory barrier as a typical lock acquire, i.e. this has
acquire semantics, because writers are still executing in parallel loads to rcu protected data
must still be done with care to ensure that single loads are done (to avoid TOCTOU errors) and
any additional memory barriers are done if needed to coordinate with writers (whether this is
needed depends entirely on the nature of the data structure and the actions performed by
writers).
This method is thread-safe.
Note: You probably do not want to call this directly, and should be using the
AutoSimpleGenerationalReader RAII wrapper.
Defined at line 82 of file ../../zircon/kernel/lib/mmu_rcu/include/lib/mmu_rcu/simple_generational_rcu.h
void ReadUnlock (uint32_t gen)
Release the previously acquired ReadLock.
This has release semantics and no rcu protected objects should continue to be referenced after
this, as the writer will assume they now have exclusive access to them.
This method is thread-safe.
Defined at line 140 of file ../../zircon/kernel/lib/mmu_rcu/include/lib/mmu_rcu/simple_generational_rcu.h
void Synchronize ()
Performs a synchronization with any outstanding readers. On return the caller can be certain
that any read critical sections that began prior to Synchronize are guaranteed to have
completed. (A read critical section is the code that occurs between a ReadLock/ReadUnlock
block).
Any calls to ReadLock that occurred after this function started may or may not complete.
Prior to calling this the writer must assume that any modifications to pointers, or objects,
are visible to readers. As a consequence any updates to pointers requires separate release
barriers to ensure data is up to date before a reader can observe the pointer change.
After returning the writer can assume that any objects it had detached are no longer referenced
by any readers and it has complete exclusive access to them.
This method is thread-compatible and unlike ReadLock and ReadUnlock must be externally
synchronized.
Defined at line 165 of file ../../zircon/kernel/lib/mmu_rcu/include/lib/mmu_rcu/simple_generational_rcu.h