44 [[nodiscard]] std::string_view
name() const noexcept override;
59 [[nodiscard]] std::
size_t count() const noexcept;
62 [[nodiscard]] std::
size_t maxCount() const noexcept;
Common interface for synchronization primitives.
A result type that holds either a success value of type T or an ErrorCode.
Result< void > release(ProcessId pid) override
Releases one semaphore unit.
~Semaphore() override
Destroys semaphore.
Result< void > registerProcessPriority(ProcessId pid, PriorityLevel basePriority)
Registers process base priority used for boost rules.
std::string_view name() const noexcept override
Primitive name for diagnostics.
SyncLayer layer() const noexcept override
Layer classification for synchronization model split.
std::size_t count() const noexcept
Current available count.
PriorityLevel basePriority(ProcessId pid) const noexcept
Registered base priority.
Semaphore(std::size_t initialCount=1, std::size_t maxCount=1)
Constructs semaphore with initial and maximum count.
Semaphore(const Semaphore &)=delete
Copy construction is disabled.
std::unique_ptr< Impl > impl_
Result< void > tryAcquire(ProcessId pid) override
Non-blocking acquire attempt.
PriorityLevel effectivePriority(ProcessId pid) const noexcept
Effective priority after inheritance boosts.
Result< void > acquire(ProcessId pid) override
Acquires one semaphore unit.
std::size_t waitingCount() const noexcept
Number of waiting processes.
Semaphore & operator=(const Semaphore &)=delete
Copy assignment is disabled.
Semaphore(Semaphore &&) noexcept
Move-constructs semaphore state.
std::size_t maxCount() const noexcept
Configured maximum count.
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.