|
Embedded Artistry Framework
Embedded Systems C++ Framework
|
#include <freertos_condition_variable.hpp>

Public Member Functions | |
| ConditionVariable ()=default | |
| ~ConditionVariable () noexcept | |
| bool | wait (embvm::VirtualMutex *mutex) noexcept final |
| Blocks the current thread until the condition variable is woken up or after the specified timeout duration. More... | |
| bool | wait (embvm::VirtualMutex *mutex, const embvm::os_timeout_t &timeout) noexcept final |
| bool | wait (embvm::VirtualMutex *mutex, const timespec &timeout) noexcept |
| void | signal () noexcept final |
| notifies one waiting thread More... | |
| void | broadcast () noexcept final |
| Notify all waiting threads. More... | |
| embvm::cv::handle_t | native_handle () const noexcept final |
| bool | wait (embvm::VirtualMutex *mutex, const embvm::cv::func_t &predicate) noexcept |
| bool | wait (embvm::VirtualMutex *mutex, const embvm::cv::func_t &predicate, const embvm::os_timeout_t &timeout=embvm::OS_WAIT_FOREVER) noexcept |
| void | notify_one () noexcept |
| Alias for signal so we can work with STL types. More... | |
| void | notify_all () noexcept |
| Alias for broadcast so we can work with STL types. More... | |
Private Types | |
| using | TQueueType = typename std::conditional<(FREERTOS_NUM_THREADS_PER_CV==0), std::queue< embvm::thread::handle_t >, etl::queue< embvm::thread::handle_t, FREERTOS_NUM_THREADS_PER_CV > >::type |
Private Member Functions | |
| bool | freertos_wait (embvm::VirtualMutex *mutex, uint32_t ticks_timeout) noexcept |
| void | pop_and_notify () noexcept |
Private Attributes | |
| os::freertos::Semaphore | sem_ {embvm::semaphore::mode::binary} |
| TQueueType | q_ |
|
private |
|
default |
|
finalvirtualnoexcept |
Notify all waiting threads.
Implements embvm::VirtualConditionVariable.
References os::freertos::Semaphore::give(), pop_and_notify(), q_, sem_, and os::freertos::Semaphore::take().
|
privatenoexcept |
References embvm::this_thread::get_handle(), portMAX_DELAY, and r.
|
inlinefinalvirtualnoexcept |
Implements embvm::VirtualConditionVariable.
References os::freertos::Semaphore::native_handle(), and sem_.
|
inlinenoexceptinherited |
Alias for broadcast so we can work with STL types.
References embvm::VirtualConditionVariable::broadcast().
|
inlinenoexceptinherited |
Alias for signal so we can work with STL types.
References embvm::VirtualConditionVariable::signal().
|
privatenoexcept |
References q_.
Referenced by broadcast(), and signal().
|
finalvirtualnoexcept |
notifies one waiting thread
Implements embvm::VirtualConditionVariable.
References os::freertos::Semaphore::give(), pop_and_notify(), q_, sem_, and os::freertos::Semaphore::take().
|
finalvirtualnoexcept |
Blocks the current thread until the condition variable is woken up or after the specified timeout duration.
Implements embvm::VirtualConditionVariable.
References portMAX_DELAY.
|
finalvirtualnoexcept |
Implements embvm::VirtualConditionVariable.
References os::freertos::frameworkTimeoutToTicks().
|
noexcept |
References os::freertos::frameworkTimeoutToTicks(), and embutil::timespecToDuration().
|
inlinenoexceptinherited |
References embvm::VirtualConditionVariable::wait().
|
inlinenoexceptinherited |
We break when the predicate is true or when we've timed out
References embvm::VirtualConditionVariable::wait().
|
private |
Referenced by broadcast(), pop_and_notify(), signal(), and ~ConditionVariable().
|
private |
Referenced by broadcast(), native_handle(), and signal().
1.8.15