Expand description
Synchronization objects used by Starnix
Macros§
- lock_
ordering - This macro takes a definition of the lock ordering graph in the form of lock_ordering!{ Unlocked -> A, A -> B, Unlocked -> C, }
Structs§
- Atomic
Monotonic Instant - An atomic wrapper around
zx::MonotonicInstant. - CondVar
- A Condition Variable that is compatible with both standard Mutex and LockDepMutex in Starnix.
- Dynamic
Lock DepMutex - A Mutex that dynamically enforces lock ordering at runtime, without using types for levels.
- Dynamic
Lock DepRw Lock - An RwLock that dynamically enforces lock ordering at runtime, without using types for levels.
- Event
Wait Guard - A guard object to enforce that clients call
begin_waitbeforeblock_until. - Interruptible
Event - A blocking object that can either be notified normally or interrupted
- Lock
DepGuard - Lock
DepMutex - A Mutex that dynamically enforces lock ordering at runtime using types for levels.
- Lock
DepRead Guard - Lock
DepRw Lock - An RwLock that dynamically enforces lock ordering at runtime using types for levels.
- Lock
DepWrite Guard - Lock
Level Token - A token that represents a lock level being held for lockdep purposes. This does not actually hold a lock, but updates the lockdep state as if it did.
- Mapped
Lock DepGuard - Mapped
Lock DepRead Guard - Mapped
Lock DepWrite Guard - Port
Event - A wrapper around a
zx::Portthat optimizes for the case where events are signaled within a process. - RwSeq
Lock - A sequence lock that combines a standard lock (like a Mutex) with a sequence counter. This allows lock-free concurrent reads by spinning if a write is in progress, while still enforcing mutually exclusive writes.
- RwSeq
Lock Guard - A guard that manages the sequence counter and wraps the underlying lock guard.
- Thread
Affinity - A synchronization primitive that tracks thread affinity.
- Thread
Affinity Guard - Wait
Token - A token that proves the caller is allowed to access the inner guard. Its field is private, so it can only be constructed within this crate.
Enums§
- AioEvents
Lock - AioPending
Operations Lock - Ashmem
State Lock - Audit
Deny Counts Lock - Audit
Netlink Client Audit Response Lock - Audit
Queue Lock - Audit
Sink Lock - Before
FsNode Append - Binder
Context Manager Level - Binder
Freeze Level - Binder
FsDevices Level - Binder
Object Level - Binder
Process Shared Memory Level - Binder
Process State Level - Binder
Procs Level - Binder
Thread State Lock - Booted
Lock - Cgroup
Children Lock - Cgroup
Directory Interface Files Lock - Cgroup
Directory Nodes Lock - Cgroup
PidTable Lock - Cgroup
State Lock - Cgroup
V1Level - Component
Controller Lock - Component
Mount Record Lock - DevKmsg
Lock - Device
Mapper Registry Devices Lock - Device
Registry State Level - Device
Terminals Lock - DirEntry
Children Level - DirEntry
Children Recursive Level - DmDevice
State Lock - Dynamic
File State Lock - Dynamic
Thread Spawner Lock - Ebpf
MapState Level - Ebpf
State Lock - Ebpf
Suspend Lock - Epoll
State Lock - Epoll
Waitable State Lock - Event
FdInner Lock - Event
Handler Ready Queue Lock - Executor
Vmar Manager Lock - Fastrpc
Inner State - FdTable
Writer Queue Lock - File
Async Owner Lock - File
Epoll Files Lock - File
Lease Lock - File
Object Offset - File
Server Stats Lock - File
System Entries Lock - File
System Permanent Lock - Framebuffer
Info Lock - Framebuffer
Memory Lock - Framebuffer
Presentation Receiver Lock - Framebuffer
Scene State Lock - Framebuffer
View Bound Protocols Lock - Framebuffer
View Identity Lock - FsContext
State Lock - FsNode
Append - FsNode
Flock Info Lock - FsNode
FsVerity Lock - FsNode
Info Level - FsNode
Info Recursive Level - FsNode
Write Guard State Lock - FsRegistry
Lock - FsRename
- FsRename
Recursive - Fuchsia
Remote Target Lock - Function
FsResult Lock - Function
FsState Lock - Fuse
Connection State Lock - Fuse
Connections Lock - Fuse
DirEntry Children Level - Fuse
FsNode Info Level - Fuse
FsRename Level - Fuse
Node State Lock - Futex
Table State Lock - Generic
Netlink Server State Lock - HrTimer
IsInterval Lock - HrTimer
Manager State Lock - Icmp
Ping Gids Lock - Inflight
Vmspliced Payloads Lock - Inotify
State Lock - Inotify
Watchers Lock - Input
Device File Nodes Lock - Input
Event Relay Opened Files Lock - Input
File Input File Lock - Interval
Timer State - IoUring
State Lock - Kernel
IpTables - Kernel
Swap Files - Kgsl
Allocator Lock - Kgsl
Contexts Lock - Kgsl
GpuObjs Lock - Kgsl
Sync Sources Lock - Loop
Device State Lock - Loop
Devices Lock - Magma
Buffers Lock - Magma
Connections Lock - Magma
Devices Lock - Magma
Semaphores Lock - MapInfo
Cache BufLock - Memory
Attribution Publisher Lock - Memory
Directory Readdir Position Lock - Memory
Pressure Monitor - Memory
Pressure Monitor Client State - Memory
Xattr Storage Level - MmDumpable
- Mounts
Level - Namespace
Flags Lock - Nanohub
Contents Lock - Nanohub
Service Lock - Netlink
Socket Inner Lock - Netns
IdLock - Netstack
Devices Lock - Nmfs
Network Manager Lock - Notify
Kind - The kind of notification.
- Overlay
FsDir Entries Lock - Overlay
FsState Lock - Pager
Files ByInode Lock - Pager
Filesystems Lock - Perf
Event Level - Perf
Format IdLookup Table Lock - Perf
Ring Buffer State Lock - PidTo
Koid MapInner Lock - PidTo
Koid MapLock - Port
Wait Result - The result of a call to [
PortEvent.wait]. - Port
Waiter Callbacks Lock - Port
Waiter Wait Queues Lock - Power
Message Counters Lock - Process
Group State - Profile
Handle Cache Lock - PtsIds
SetLock - QbgRead
Queue Lock - QbgShutdown
Lock - Qipcrtr
Socket Inner Lock - Read
Write Bytes File Lock - Record
Locks State Lock - Remote
Binder Controller Lock - Remote
Binder Handle Level - Remote
Binder Responder Lock - Remote
Block Device Registry Devices Lock - Remote
Bundle Inner Lock - Remote
Unix Domain Socket State Lock - RwQueue
Inner Lock - SeLinux
FsContext SidLock - SeLinux
Peer SidLock - SeLinux
Pending Entries Lock - SeLinux
Pending File Systems Lock - SeLinux
Update Lock - Seccomp
Notifier Lock - Session
Mutable State Lock - Signal
Actions Lock - Signal
FdMask Lock - Simple
Directory Entries Lock - Socket
State Lock - Stub
Bytes File State Lock - Suspend
Resume Manager Inner Lock - Syscall
LogFilters Lock - Syslog
State Lock - Syslog
Subscription Lock - Task
Command Level - Task
Creds Lock - Task
Mutable State Lock - Terminal
Mutable State Lock - Thermal
Charge Level Lock - Thread
Group Limits - Thread
Group Mutable State Lock - Thread
Group Pending Signals Lock - Thread
Group Ptracees Lock - Thread
Lockup Detector Registry Lock - Timer
File Info Lock - Timer
Table State Lock - Touch
Power Policy Enabled Lock - Trace
FsData Lock - TunDev
TunLock - UEvent
Netlink Socket Device Listener KeyLock - Uinput
Device State Lock - Uninterruptible
Lock - Unix
Socket Inner Lock - Unlocked
- User
Fault Inner - UtsNamespace
Lock - Vmsplice
Segments Lock - Vsock
Socket Inner Lock - Wait
Queue Impl Lock - Waiter
Event Handler Lock - Wake
Reason - A description of why a
block_untilreturned without the event being notified. - Wake
Sources Lock - Wake
Watchers Lock
Traits§
- Async
Unlockable - A trait for lock guards that can be temporarily unlocked asynchronously. This is useful for performing async operations while holding a lock, without causing deadlocks or holding the lock for an extended period.
- Lock
Level - A trait for types that represent a lock level in the lock dependency tracker.
- Mutex
Like - A generic mutex for the ordered_lock operations.
- RwLock
Like - A generic rwlock for the ordered_lock operations.
- Waitable
Mutex Guard
Functions§
- allow_
subclass - A token that allows the next lock acquisition of the same level as the currently maximal held lock to use an incremented subclass. Allows subclassing of the currently maximal held lock.
- assert_
lock_ level - Asserts that the current thread can acquire locks at level
L. Returns a token that, when held, forces subsequent locks to be afterL. - ordered_
lock - Lock
m1andm2in a consistent order (using the memory address of m1 and m2 and returns the associated guard. This ensure thatordered_lock(m1, m2)andordered_lock(m2, m1)will not deadlock. - ordered_
lock_ vec - Acquires multiple mutexes in a consistent order based on their memory addresses. This helps prevent deadlocks.
- ordered_
read_ lock - Lock
r1andr2in a consistent order (using the memory address of r1 and r2) for reading. - ordered_
read_ lock_ vec - Acquires multiple rwlocks in a consistent order based on their memory addresses for reading.
- ordered_
write_ lock - Lock
r1andr2in a consistent order (using the memory address of r1 and r2) for writing. - ordered_
write_ lock_ vec - Acquires multiple rwlocks in a consistent order based on their memory addresses for writing.