|
| Mail ()=default |
| Create and initialize Mail queue. More...
|
|
bool | empty () const |
| Check if the mail queue is empty. More...
|
|
bool | full () const |
| Check if the mail queue is full. More...
|
|
T * | alloc (MBED_UNUSED uint32_t millisec=0) |
| Allocate a memory block of type T, without blocking. More...
|
|
T * | try_alloc () |
| Allocate a memory block of type T, without blocking. More...
|
|
T * | try_alloc_for (Kernel::Clock::duration_u32 rel_time) |
| Allocate a memory block of type T, optionally blocking. More...
|
|
T * | alloc_for (uint32_t millisec) |
| Allocate a memory block of type T, optionally blocking. More...
|
|
T * | try_alloc_until (Kernel::Clock::time_point abs_time) |
| Allocate a memory block of type T, blocking. More...
|
|
T * | alloc_until (uint64_t millisec) |
| Allocate a memory block of type T, blocking. More...
|
|
T * | calloc (MBED_UNUSED uint32_t millisec=0) |
| Allocate a memory block of type T, and set memory block to zero. More...
|
|
T * | try_calloc () |
| Allocate a memory block of type T, and set memory block to zero. More...
|
|
T * | try_calloc_for (Kernel::Clock::duration_u32 rel_time) |
| Allocate a memory block of type T, optionally blocking, and set memory block to zero. More...
|
|
T * | calloc_for (uint32_t millisec) |
| Allocate a memory block of type T, optionally blocking, and set memory block to zero. More...
|
|
T * | try_calloc_until (Kernel::Clock::time_point abs_time) |
| Allocate a memory block of type T, blocking, and set memory block to zero. More...
|
|
T * | calloc_until (uint64_t millisec) |
| Allocate a memory block of type T, blocking, and set memory block to zero. More...
|
|
osStatus | put (T *mptr) |
| Put a mail in the queue. More...
|
|
osEvent | get (uint32_t millisec=osWaitForever) |
| Get a mail from the queue. More...
|
|
T * | try_get () |
| Get a mail from the queue. More...
|
|
T * | try_get_for (Kernel::Clock::duration_u32 rel_time) |
| Get a mail from the queue. More...
|
|
osStatus | free (T *mptr) |
| Free a memory block from a mail. More...
|
|
template<typename T, uint32_t queue_sz>
class rtos::Mail< T, queue_sz >
The Mail class allows you to control, send, receive or wait for mail.
A mail is a memory block that is sent to a thread or interrupt service routine (ISR).
- Template Parameters
-
T | Data type of a single mail message element. |
queue_sz | Maximum number of mail messages in queue. |
- Note
- Memory considerations: The mail data store and control structures are part of this class - they do not (themselves) allocate memory on the heap, both for the Mbed OS and underlying RTOS objects (static or dynamic RTOS memory pools are not being used).
-
Bare metal profile: This class is not supported.
Definition at line 68 of file Mail.h.