5 #ifndef OS_COUNTING_SEMAPHORE_HPP_ 6 #define OS_COUNTING_SEMAPHORE_HPP_ 91 #endif // OS_COUNTING_SEMAPHORE_HPP_ ~CountingSemaphore() final
Destructor.
Timeout occurred during wait.
static CountingSemaphoreInterface * getDelegate(CountingSemaphoreHandleStorage &aligned_new_memory, U32 initial_count)
provide a pointer to a CountingSemaphore delegate object
CountingSemaphoreHandle * getHandle() override
return the underlying semaphore handle (implementation specific)
CountingSemaphore(U32 initial_count)
Constructor with initial count.
CountingSemaphoreInterface()=default
default constructor
CountingSemaphore & operator=(const CountingSemaphore &other)=delete
U8 CountingSemaphoreHandleStorage[FW_COUNTING_SEMAPHORE_HANDLE_MAX_SIZE]
Invalid semaphore or argument.
virtual ~CountingSemaphoreInterface()=default
default virtual destructor
Status waitTimeout(const Fw::TimeInterval &interval) override
wait with timeout
Status tryWait() override
non-blocking attempt to decrement the semaphore
CountingSemaphoreInterface & operator=(const CountingSemaphoreInterface &other)=delete
assignment operator is forbidden
virtual Status tryWait()=0
non-blocking attempt to decrement the semaphore
CountingSemaphore does not support operation.
virtual Status waitTimeout(const Fw::TimeInterval &interval)=0
wait on the semaphore with a timeout
virtual Status post()=0
post (increment) the semaphore, potentially waking a waiting thread
Operation was successful.
Status wait() override
wait (decrement), blocking if count is zero
Status post() override
post (increment) the semaphore, potentially waking a waiting thread
virtual Status wait()=0
wait (decrement) the semaphore, blocking if count is zero
virtual CountingSemaphoreHandle * getHandle()=0
return the underlying semaphore handle (implementation specific)