|
CHERIoT RTOS
A compartmentalised RTOS for CHERIoT hardware
|
Condition variable C++ wrapper. More...
#include <locks.hh>
Public Member Functions | |
| int | signal () |
| Wake one waiter. | |
| int | broadcast () |
| Wake all waiters. | |
| template<TryLockable Mutex> | |
| int | wait (TimeoutArgument t, Mutex &mutex) |
| Atomically release mutex, wait until the condition variable is signalled, and reacquire the mutex. | |
| template<Lockable Mutex> requires (!TryLockable<Mutex>) | |
| int | wait (TimeoutArgument t, Mutex &mutex) |
| Atomically release mutex, wait until the condition variable is signalled, and reacquire the mutex. | |
|
inline |
Wake all waiters.
Propagates errors from condition_variable_notify.
Definition at line 468 of file locks.hh.
References condition_variable_notify().
|
inline |
Wake one waiter.
Propagates errors from condition_variable_notify.
Definition at line 460 of file locks.hh.
References condition_variable_notify().
|
inline |
Atomically release mutex, wait until the condition variable is signalled, and reacquire the mutex.
This variant uses locks with no timeout and so may block for longer than the specified timeout while reacquiring the lock. It will not attempt to reacquire the lock if the timeout happens before the condition variable is signalled, so can still fail in the same ways as the normal overload.
Definition at line 502 of file locks.hh.
References condition_variable_wait().
|
inline |
Atomically release mutex, wait until the condition variable is signalled, and reacquire the mutex.
This will return 0 if the sequence completes correctly, or -ETIMEDOUT if waiting or reacquiring the lock failed due to a timeout.
Definition at line 481 of file locks.hh.
References condition_variable_wait().