47 [[nodiscard]] std::string_view
name() const noexcept override;
Common interface for synchronization primitives.
SyncLayer layer() const noexcept override
Layer classification for synchronization model split.
PriorityLevel basePriority(ProcessId pid) const noexcept
Registered base priority.
Mutex(const Mutex &)=delete
Copy construction is disabled.
Mutex(Mutex &&) noexcept
Move-constructs mutex state.
bool isLocked() const noexcept
True when the mutex is owned by some process.
std::unique_ptr< Impl > impl_
Mutex & operator=(const Mutex &)=delete
Copy assignment is disabled.
PriorityLevel effectivePriority(ProcessId pid) const noexcept
Effective priority after inheritance boosts.
Mutex()
Constructs an unlocked mutex.
~Mutex() override
Destroys mutex.
std::size_t recursionDepth() const noexcept
Reentrancy depth for owner.
Result< void > tryAcquire(ProcessId pid) override
Attempts immediate acquire without enqueueing waiters.
Result< void > registerProcessPriority(ProcessId pid, PriorityLevel basePriority)
Registers process base priority used by inheritance logic.
std::string_view name() const noexcept override
Primitive name for diagnostics.
std::optional< ProcessId > owner() const noexcept
Current owner process ID, if locked.
std::size_t waitingCount() const noexcept
Number of waiting processes.
Result< void > acquire(ProcessId pid) override
Acquires the mutex for process pid.
Result< void > release(ProcessId pid) override
Releases the mutex held by process pid.
A result type that holds either a success value of type T or an ErrorCode.
ISyncPrimitive interface for synchronization objects.
PriorityLevel
Discrete priority levels, from highest (Realtime) to lowest (Idle).
std::uint32_t ProcessId
Unique identifier for a process.
SyncLayer
Distinguishes simulated sync resources from kernel-internal locks.
Process priority levels and the Priority struct.