Modules | |
| EventFlags class | |
| Mail class | |
| MemoryPool class | |
| Mutex class | |
| Queue class | |
| RTOS hook functions | |
| Idle hook function | |
| RtosTimer class | |
| Semaphore class | |
| ThisThread namespace | |
| Thread class | |
Namespaces | |
| rtos::Kernel | |
| Functions in the Kernel namespace control RTOS kernel information. | |
Data Structures | |
| class | ConditionVariable |
| The ConditionVariable class is a synchronization primitive that allows threads to wait until a particular condition occurs. More... | |
Typedefs | |
| typedef mbed::ScopedLock< Mutex > | ScopedMutexLock |
| Typedef for the mutex lock. More... | |
| typedef osRtxMutex_t | mbed_rtos_storage_mutex_t |
| RTOS primitives storage types for RTX. More... | |
Functions | |
| ConditionVariable (Mutex &mutex) | |
| Create and initialize a ConditionVariable object. More... | |
| void | wait () |
| Wait for a notification. More... | |
| bool | wait_until (uint64_t millisec) |
| Wait for a notification until the specified time. More... | |
| bool | wait_for (uint32_t millisec) |
| Wait for a notification or timeout. More... | |
| void | notify_one () |
| Notify one waiter on this condition variable that a condition changed. More... | |
| void | notify_all () |
| Notify all waiters on this condition variable that a condition changed. More... | |
| ~ConditionVariable () | |
| ConditionVariable destructor. More... | |
| uint64_t | get_ms_count () |
| Read the current RTOS kernel millisecond tick count. More... | |
| void | attach_idle_hook (void(*fptr)(void)) |
| Attach a function to be called by the RTOS idle task. More... | |
| void | attach_thread_terminate_hook (void(*fptr)(osThreadId_t id)) |
| Attach a function to be called when a thread terminates. More... | |
| typedef osRtxMutex_t mbed_rtos_storage_mutex_t |
RTOS primitives storage types for RTX.
Types defined in this file should be utilized, when the direct RTOS C API usage is required, to provide backing memory for internal RTX data. Allocated object should be wrapped in attribute struct and passed to os*New call, for details see CMSIS-RTOS2 documentation.
Definition at line 46 of file mbed_rtos_storage.h.
| typedef mbed::ScopedLock<Mutex> ScopedMutexLock |
Typedef for the mutex lock.
Usage:
| void rtos::Kernel::attach_idle_hook | ( | void(*)(void) | fptr | ) |
Attach a function to be called by the RTOS idle task.
| fptr | pointer to the function to be called |
| void rtos::Kernel::attach_thread_terminate_hook | ( | void(*)(osThreadId_t id) | fptr | ) |
Attach a function to be called when a thread terminates.
| fptr | pointer to the function to be called |
| ConditionVariable | ( | Mutex & | mutex | ) |
Create and initialize a ConditionVariable object.
| uint64_t rtos::Kernel::get_ms_count | ( | ) |
Read the current RTOS kernel millisecond tick count.
The tick count corresponds to the tick count the RTOS uses for timing purposes. It increments monotonically from 0 at boot, so it effectively never wraps. If the underlying RTOS only provides a 32-bit tick count, this method expands it to 64 bits.
| void notify_all | ( | ) |
Notify all waiters on this condition variable that a condition changed.
This function unblocks all of the threads waiting for the condition variable.
| void notify_one | ( | ) |
Notify one waiter on this condition variable that a condition changed.
This function unblocks one of the threads waiting for the condition variable.
| void wait | ( | ) |
Wait for a notification.
Wait causes the current thread to block until the condition variable receives a notification from another thread.
Example:
| bool wait_for | ( | uint32_t | millisec | ) |
Wait for a notification or timeout.
Wait for causes the current thread to block until the condition variable receives a notification from another thread, or the timeout specified by the millisec parameter is reached.
| millisec | Timeout value or osWaitForever in case of no timeout. |
true if a timeout occurred, false otherwise.Example:
| bool wait_until | ( | uint64_t | millisec | ) |
Wait for a notification until the specified time.
Wait until causes the current thread to block until the condition variable is notified, or a specific time given by millisec parameter is reached.
| millisec | Absolute end time referenced to Kernel::get_ms_count() |
true if a timeout occurred, false otherwise.Example:
| ~ConditionVariable | ( | ) |
ConditionVariable destructor.