5 #ifndef OS_DARWIN_COUNTING_SEMAPHORE_HPP 6 #define OS_DARWIN_COUNTING_SEMAPHORE_HPP 7 #include <dispatch/dispatch.h> 46 #endif // OS_DARWIN_COUNTING_SEMAPHORE_HPP Status tryWait() override
non-blocking attempt to decrement the semaphore
dispatch_semaphore_t m_semaphore
Status waitTimeout(const Fw::TimeInterval &interval) override
wait on the semaphore with a timeout
CountingSemaphoreHandle * getHandle() override
return the underlying semaphore handle (implementation specific)
Status post() override
post (increment) the semaphore, potentially waking a waiting thread
DarwinCountingSemaphore(U32 initial_count)
CountingSemaphoreInterface & operator=(const CountingSemaphoreInterface &other)=delete
Status wait() override
wait (decrement) the semaphore, blocking if count is zero
~DarwinCountingSemaphore() override