F´ Flight Software - C/C++ Documentation
devel
A framework for building embedded system applications to NASA flight quality standards.
|
interface for condition variables More...
#include <Os/Condition.hpp>
Public Member Functions | |
ConditionVariableInterface ()=default | |
Default constructor. More... | |
virtual | ~ConditionVariableInterface ()=default |
Default destructor. More... | |
ConditionVariableInterface (const ConditionVariableInterface &other)=delete | |
copy constructor is forbidden More... | |
virtual ConditionVariableInterface & | operator= (const ConditionVariableInterface &other)=delete |
assignment operator is forbidden More... | |
virtual void | wait (Os::Mutex &mutex)=0 |
wait on a condition variable More... | |
virtual void | notify ()=0 |
notify a single waiter on this condition variable More... | |
virtual void | notifyAll ()=0 |
notify all waiters on this condition variable More... | |
virtual ConditionVariableHandle * | getHandle ()=0 |
return the underlying condition variable handle (implementation specific). More... | |
Static Public Member Functions | |
static ConditionVariableInterface * | getDelegate (ConditionVariableHandleStorage &aligned_new_memory) |
provide a pointer to a Mutex delegate object More... | |
interface for condition variables
Condition variables allow a program to block on a condition while atomically releasing an Os::Mutex and atomically reacquiring the mutex once the condition has been notified.
Definition at line 20 of file Condition.hpp.
|
default |
Default constructor.
|
virtualdefault |
Default destructor.
|
delete |
copy constructor is forbidden
|
static |
provide a pointer to a Mutex delegate object
get a delegate for condition variable
get a delegate for MutexInterface that intercepts calls for Posix
aligned_new_memory | aligned memory to fill |
Definition at line 22 of file DefaultMutex.cpp.
|
pure virtual |
return the underlying condition variable handle (implementation specific).
Implemented in Os::Stub::Mutex::StubConditionVariable, Os::Posix::Mutex::PosixConditionVariable, and Os::ConditionVariable.
|
pure virtual |
notify a single waiter on this condition variable
Notify a single waiter on this condition variable. It is not necessary to hold the mutex supplied by the waiters and it is advantageous not to hold the lock to prevent immediate re-blocking.
Implemented in Os::Stub::Mutex::StubConditionVariable, Os::Posix::Mutex::PosixConditionVariable, and Os::ConditionVariable.
|
pure virtual |
notify all waiters on this condition variable
Notify all waiters on this condition variable. It is not necessary to hold the mutex supplied by the waiters and it is advantageous not to hold the lock to prevent immediate re-blocking.
Implemented in Os::Stub::Mutex::StubConditionVariable, Os::Posix::Mutex::PosixConditionVariable, and Os::ConditionVariable.
|
virtualdelete |
assignment operator is forbidden
Reimplemented in Os::Stub::Mutex::StubConditionVariable, Os::Posix::Mutex::PosixConditionVariable, and Os::ConditionVariable.
|
pure virtual |
wait on a condition variable
Wait on a condition variable. This function will atomically unlock the provided mutex and block on the condition in one step. Blocking will occur until a future notify
or notifyAll
call is made to this variable on another thread of execution.
mutex | mutex to unlock as part of this operation |
Implemented in Os::Stub::Mutex::StubConditionVariable, Os::Posix::Mutex::PosixConditionVariable, and Os::ConditionVariable.