class ChainLockTransaction
Defined at line 68 of file ../../zircon/kernel/lib/kconcurrent/include/lib/kconcurrent/chainlock.h
ChainLockTransaction derives from concurrent::ChainLockTransaction to adapt the environment-
independent libconcurrent chain lock library to the kernel environment by providing the following
methods and types required by the base CRTP type:
static void SetActive(ChainLockTransaction*);
static void ChainLockTransaction* Active();
static Token AllocateReservedToken();
static zx_instant_mono_ticks_t GetCurrentTicks();
static void OnFinalized(zx_instant_mono_t, concurrent::CallsiteInfo);
template
<StateOptions
> struct StateSaver;
The above are declared in this file and defined in lib/kconcurrent/chainlock_transaction.h to
avoid circular dependencies with kernel/thread.h, which uses the types declared here and also
provides some of the facilities used by the methods and types listed above.
Public Methods
void ~ChainLockTransaction ()
Defined at line 40 of file ../../zircon/kernel/lib/kconcurrent/include/lib/kconcurrent/chainlock_transaction.h
ChainLockTransaction * Active ()
Returns the active chain lock transaction for the current CPU or nullptr.
Defined at line 42 of file ../../zircon/kernel/lib/kconcurrent/include/lib/kconcurrent/chainlock_transaction.h
void Yield ()
Performs an architecture-specific CPU relax operation.
Defined at line 78 of file ../../zircon/kernel/lib/kconcurrent/include/lib/kconcurrent/chainlock.h
Enumerations
enum StateOptions
| Name | Value |
|---|---|
| NoIrqSave | 0 |
| IrqSave | 1 |
| PreemptDisable | 2 |
| EagerReschedDisable | 3 |
Specifies which IRQ save and preempt disable options are required over the transaction.
Defined at line 81 of file ../../zircon/kernel/lib/kconcurrent/include/lib/kconcurrent/chainlock.h
Records
Friends
class ChainLockTransaction
template <StateOptions>
class SingleChainLockGuard