Crate starnix_sync

source ·
Expand description

Synchronization objects used by Starnix

Re-exports§

Macros§

Structs§

  • An atomic wrapper around zx::Time.
  • A guard object to enforce that clients call begin_wait before block_until.
  • A blocking object that can either be notified normally or interrupted
  • Enforcement mechanism for lock ordering.
  • A wrapper for mutex that requires a Locked context to acquire. This context must be of a level that precedes L in the lock ordering graph where L is a level associated with this mutex.
  • A wrapper for an RwLock that requires a Locked context to acquire. This context must be of a level that precedes L in the lock ordering graph where L is a level associated with this RwLock.
  • A wrapper around a zx::Port that optimizes for the case where events are signaled within a process.

Enums§

Traits§

  • Marker trait that indicates that Self can be locked after A.
  • Marker trait that indicates that Self is an ancestor of X.
  • Marker trait that indicates that Self is X or an ancestor of X.
  • Describes how to apply a lock type to the implementing type.
  • Describes how to acquire reader and writer locks to the implementing type.

Functions§

  • Lock two OrderedMutex of the same level in the consistent order. Returns both guards and a new locked context.
  • Lock m1 and m2 in a consistent order (using the memory address of m1 and m2 and returns the associated guard. This ensure that ordered_lock(m1, m2) and ordered_lock(m2, m1) will not deadlock.

Type Aliases§