![]() |
F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
|
interface for condition variables More...
#include <Os/ConditionVariableInterface.hpp>
Public Types | |
| enum | Status { OP_OK, ERROR_MUTEX_NOT_HELD, ERROR_DIFFERENT_MUTEX, ERROR_NOT_IMPLEMENTED, NOT_SUPPORTED, ERROR_OTHER } |
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 Status | pend (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... | |
| void | wait (Os::Mutex &mutex) |
| wait on a condition variable and assert success More... | |
Static Public Member Functions | |
| static ConditionVariableInterface * | getDelegate (ConditionVariableHandleStorage &aligned_new_memory) |
| provide a pointer to a ConditionVariable 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 34 of file ConditionVariableInterface.hpp.
Definition at line 36 of file ConditionVariableInterface.hpp.
|
default |
Default constructor.
|
virtualdefault |
Default destructor.
|
delete |
copy constructor is forbidden
|
static |
provide a pointer to a ConditionVariable 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 20 of file DefaultMutex.cpp.
|
pure virtual |
return the underlying condition variable handle (implementation specific).
Implemented in Os::DelegateConditionVariable, Os::Posix::Mutex::PosixConditionVariable, and Os::Stub::Mutex::StubConditionVariable.
|
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::DelegateConditionVariable, Os::Posix::Mutex::PosixConditionVariable, and Os::Stub::Mutex::StubConditionVariable.
|
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::DelegateConditionVariable, Os::Posix::Mutex::PosixConditionVariable, and Os::Stub::Mutex::StubConditionVariable.
|
virtualdelete |
assignment operator is forbidden
Reimplemented in Os::DelegateConditionVariable, Os::Posix::Mutex::PosixConditionVariable, and Os::Stub::Mutex::StubConditionVariable.
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::DelegateConditionVariable, Os::Posix::Mutex::PosixConditionVariable, and Os::Stub::Mutex::StubConditionVariable.
|
inline |
wait on a condition variable and assert success
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 |
Definition at line 106 of file ConditionVariableInterface.hpp.