Skip to main content

Module chainlock_transaction

Module chainlock_transaction 

Source

Structs§

AccountingStorageDisabled
Zero-sized storage for debug accounting when DebugAccountingEnabled is false.
AccountingStorageEnabled
Storage for debug accounting when DebugAccountingEnabled is true.
AtomicToken
Atomic storage for a Token.
Bool
Helper type for selecting storage types from compile-time bool constants.
ChainLockTransaction
Environment-independent framework for chain lock transactions.
ChainLockTransactionToken
Zero-sized capability token proving that a transaction of type T is currently active on the calling execution context.
DoneType
Marker type indicating completion of a transaction with no return value.
Option
Wrapper for a transaction state option tag.
SavedState
Saved transaction state returned by ChainLockTransaction::save_state_and_use_reserved_token and ChainLockTransaction::save_state_initial, used to restore an active transaction across context switches.
Token
A transaction generation token used to identify the owning transaction of a ChainLock and arbitrate priority when contention occurs.
TraceStorageDisabled
Zero-sized storage when contention tracing is disabled.
TraceStorageEnabled
Extra state when contention tracing is enabled.

Enums§

Action
Non-terminal control flow action returned by a transaction attempt closure.
State
Lifecycle state of a ChainLockTransaction.
TransactionResult
Result of a single execution of a transaction attempt closure passed to until_done.

Constants§

DONE
Constant value of DoneType indicating transaction completion.

Traits§

AccountingSelector
Maps a compile-time bool to AccountingStorageEnabled or AccountingStorageDisabled.
AccountingStorage
Storage trait for debug lock accounting in ChainLockTransaction.
ContentionState
Trait for contention state stored inside a ChainLock.
IntoTransactionResult
Trait implemented by return types of closures passed to ChainLockTransaction::until_done.
StateOption
Trait implemented by compile-time state option tags passed to ChainLockTransaction::until_done.
StateSaver
Trait implemented by environment-specific state savers (such as IRQ-save and preempt-disable guards) managed by ChainLockTransaction::until_done.
TraceStorage
Storage trait for contention spin tracing in ChainLockTransaction.
TracingSelector
Maps a compile-time bool to TraceStorageEnabled<C> or TraceStorageDisabled.
Transaction
Trait representing a chain lock transaction type used by ChainLock and ChainLockGuard.
TransactionHooks
Environment-specific hooks required by ChainLockTransaction.

Type Aliases§

SelectAccounting
Type alias selecting AccountingStorageEnabled when ENABLED is true, or AccountingStorageDisabled when ENABLED is false.
SelectTracing
Type alias selecting TraceStorageEnabled<C> when ENABLED is true, or TraceStorageDisabled when ENABLED is false.