Skip to main content

Crate ksync

Crate ksync 

Source

Re-exports§

pub use pin_init;

Macros§

declare_interned_string
Statically declares a new InternedString.
declare_singleton_critical_mutex
Declares a singleton critical mutex (disables interrupts/preemption while held).
declare_singleton_lock
declare_singleton_monitored_spinlock
Declares a singleton monitored spinlock (integrated with the kernel lockup detector).
declare_singleton_mutex
Declares a singleton mutex.
declare_singleton_spinlock
Declares a singleton spinlock.
lock
Locks a mutex.
source_tag
Expands to a SourceTag containing the file path and line number ("file:line") of the call site, equivalent to C++ SOURCE_TAG.

Structs§

AliasedLock
Type tag to indicate aliased lock acquisition.
BrwLockPi
A priority-inheriting reader-writer lock.
BrwLockPiReadGuard
A validation guard representing reader lock ownership and active list participation.
BrwLockPiWriteGuard
A validation guard representing writer lock ownership and active list participation.
InterruptSavedState
Opaque token representing the saved interrupt state.
IrqSavePolicy
KCell
A container cell that safe-guards data of type T using type-level lock class tracking.
KCellInit
Initializer for KCell.
KMutex
A safe, Zircon-compatible mutual exclusion lock supporting compile-time order validation.
KMutexAliasedGuard
A validation guard representing ownership of two aliased locks simultaneously.
KMutexGuard
A validation guard representing exclusive lock ownership and active list participation.
KOnceCell
A cell that provides lazy/one-time initialization synchronized by a lock class Class.
KOnceCellGuard
A safe RAII / proxy guard providing synchronized access to a KOnceCell protected by a lock.
LockClassRegistration
A registration entry for a Rust lock class (stub for disabled lockdep).
LockEntryStorage
LockToken
A token proving that a lock of lock class Class is currently held by the current thread.
MonitoredSpinlockGuardState
Saved interrupt state and source tag for a held RawMonitoredSpinlock.
NoIrqSavePolicy
PhantomMutex
A zero-sized raw mutex implementation that does not perform physical locking.
RawBrwLockPi
Opaque layout block matching the Zircon C++ BrwLockPi exactly.
RawCriticalMutex
Opaque layout block matching the Zircon C++ CriticalMutex exactly.
RawMonitoredSpinlock
Opaque layout block matching the Zircon C++ MonitoredSpinLock exactly.
RawMutex
Opaque layout block matching the Zircon C++ Mutex exactly.
RawSpinlock
Opaque layout block matching the Zircon C++ SpinLock exactly.
SourceTag
A static C-string tag identifying the source location ("file:line") where a lock is acquired.

Constants§

LOCK_FLAGS_SINGLETON_LOCK
There is only one member of this locks class.

Traits§

LockClass
Trait implemented by lock class types to expose their dynamic LockClassId pointer.
LockPolicy
Trait defining a policy for how a lock should be acquired and released. A given RawLock may have multiple policy implementations allowing a specific instance of a lock to be acquired, at different times, in different ways.
RawLock
Trait defining a raw, un-instrumented synchronization lock abstraction.

Functions§

aliased_lock
Acquires an aliased lock on two KMutex instances that reference the same underlying lock.
aliased_lock_policy
Acquires an aliased lock with a specific policy on two KMutex instances that reference the same underlying lock.
aliased_lock_policy_with
Acquires an aliased lock with a specific policy and arguments on two KMutex instances that reference the same underlying lock.
aliased_lock_with
Acquires an aliased lock with arguments on two KMutex instances that reference the same underlying lock.
kcell_init
Creates a PinInit wrapper for initializing a KCell with an inner initializer.

Type Aliases§

KMonitoredSpinlock
KSpinlock
LockFlags
Flags to specify which rules to apply to a lock class during validation.
SingletonMutex
A statically initialized global singleton mutex.

Attribute Macros§

guarded