F´ Flight Software - C/C++ Documentation  devel
A framework for building embedded system applications to NASA flight quality standards.
ConditionVariable.hpp
Go to the documentation of this file.
1 // ======================================================================
2 // \title Os/Posix/ConditionVariable.hpp
3 // \brief Posix definitions for Os::ConditionVariable
4 // ======================================================================
5 #ifndef OS_POSIX_CONDITION_VARIABLE_HPP
6 #define OS_POSIX_CONDITION_VARIABLE_HPP
7 #include <pthread.h>
8 #include <Os/Condition.hpp>
9 
10 namespace Os {
11 namespace Posix {
12 namespace Mutex {
13 
15  pthread_cond_t m_condition;
16 };
17 
23  public:
27 
30  ~PosixConditionVariable() override;
31 
33 
35  void wait(Os::Mutex& mutex) override;
36 
38  void notify() override;
39 
41  void notifyAll() override;
42 
45 
46  private:
49 };
50 
51 } // namespace Mutex
52 } // namespace Posix
53 } // namespace Os
54 #endif // OS_POSIX_CONDITION_VARIABLE_HPP
Condition variable handle parent.
Definition: Condition.hpp:14
interface for condition variables
Definition: Condition.hpp:20
Posix implementation of Os::ConditionVariable.
ConditionVariableHandle * getHandle() override
get handle
void notify() override
notify a single waiter
void wait(Os::Mutex &mutex) override
wait releasing mutex
ConditionVariableInterface & operator=(const ConditionVariableInterface &other) override=delete
assignment operator is forbidden
void notifyAll() override
notify all current waiters