38 [[nodiscard]] std::string_view
name() const noexcept override;
Common interface for synchronization primitives.
Mutex(const Mutex &)=delete
bool isLocked() const noexcept
True when the mutex is owned by some process.
std::unique_ptr< Impl > impl_
Mutex & operator=(const Mutex &)=delete
Mutex()
Constructs an unlocked mutex.
std::size_t recursionDepth() const noexcept
Reentrancy depth for owner.
Result< void > tryAcquire(ProcessId pid) override
Attempts immediate acquire without enqueueing waiters.
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.
std::uint32_t ProcessId
Unique identifier for a process.