44 [[nodiscard]] std::string_view
name() const noexcept override;
std::string_view name() const noexcept override
Primitive name for diagnostics.
Result< void > tryEnter(ProcessId pid)
Alias for tryAcquire().
CriticalSection(std::unique_ptr< ISyncPrimitive > primitive=nullptr)
Constructs a critical section using provided primitive.
Result< void > tryAcquire(ProcessId pid) override
Non-blocking acquire on underlying primitive.
Result< void > release(ProcessId pid) override
Releases underlying primitive.
Result< void > acquire(ProcessId pid) override
Acquires underlying primitive.
CriticalSection(CriticalSection &&) noexcept
Move-constructs critical section state.
~CriticalSection() override
Destroys critical-section adapter.
std::unique_ptr< Impl > impl_
CriticalSection & operator=(const CriticalSection &)=delete
Copy assignment is disabled.
Result< void > leave(ProcessId pid)
Alias for release().
CriticalSection(const CriticalSection &)=delete
Copy construction is disabled.
Result< void > enter(ProcessId pid)
Alias for acquire().
SyncLayer layer() const noexcept override
Layer classification forwarded from underlying primitive.
Common interface for synchronization primitives.
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.
SyncLayer
Distinguishes simulated sync resources from kernel-internal locks.