12 FW_ASSERT(&this->m_delegate == reinterpret_cast<ConditionVariableInterface*>(&this->m_handle_storage[0]));
13 if (this->m_lock !=
nullptr && this->m_lock != &mutex) {
14 return Status::ERROR_DIFFERENT_MUTEX;
16 this->m_lock = &mutex;
17 return this->m_delegate.
pend(mutex);
24 FW_ASSERT(&this->m_delegate == reinterpret_cast<ConditionVariableInterface*>(&this->m_handle_storage[0]));
28 FW_ASSERT(&this->m_delegate == reinterpret_cast<ConditionVariableInterface*>(&this->m_handle_storage[0]));
33 FW_ASSERT(&this->m_delegate == reinterpret_cast<const ConditionVariableInterface*>(&this->m_handle_storage[0]));
void notify() override
notify a single waiter on this condition variable
virtual Status pend(Os::Mutex &mutex)=0
wait on a condition variable
void notifyAll() override
notify all waiters on this condition variable
ConditionVariableHandle * getHandle() override
return the underlying condition variable handle (implementation specific). Delegates to implementatio...
~ConditionVariable() final
default virtual destructor
virtual void notifyAll()=0
notify all waiters on this condition variable
virtual ~ConditionVariableInterface()=default
Default destructor.
virtual ConditionVariableHandle * getHandle()=0
return the underlying condition variable handle (implementation specific).
interface for condition variables
ConditionVariable()
default constructor
virtual void notify()=0
notify a single waiter on this condition variable
void wait(Os::Mutex &mutex)
wait on a condition variable
Condition variable handle parent.
Status pend(Os::Mutex &mutex) override
wait on a condition variable