|
void | miosix::Queue< T, len >::waitUntilNotEmpty () |
|
void | miosix::Queue< T, len >::waitUntilNotFull () |
|
void | miosix::Queue< T, len >::get (T &elem) |
|
void | miosix::Queue< T, len >::put (const T &elem) |
|
bool | miosix::Queue< T, len >::IRQget (T &elem) |
|
bool | miosix::Queue< T, len >::IRQget (T &elem, bool &hppw) |
|
bool | miosix::Queue< T, len >::IRQput (const T &elem) |
|
bool | miosix::Queue< T, len >::IRQput (const T &elem, bool &hppw) |
|
bool | miosix::DynUnsyncQueue< T >::tryPut (const T &elem) |
|
bool | miosix::DynUnsyncQueue< T >::tryGet (T &elem) |
|
Miosix syncronization API
Miosix provides the Mutex class to guard critical sections,
the ConditionVariable class for thread synchronization,
the Queue class to transfer data between threads,
and the Timer class to measure time intervals.
Mutex options, passed to the constructor to set additional options.
The DEFAULT option indicates the default Mutex type.
Enumerator |
---|
DEFAULT |
Default mutex.
|
RECURSIVE |
Mutex is recursive.
|
Mutex options, passed to the constructor to set additional options.
The DEFAULT option indicates the default Mutex type.
Enumerator |
---|
DEFAULT |
Default mutex.
|
RECURSIVE |
Mutex is recursive.
|
template<typename T , unsigned int len>
Get an element from the queue. If the queue is empty, then sleep until an element becomes available.
- Parameters
-
elem | an element from the queue |
template<typename T , unsigned int len>
Get an element from the queue, only if the queue is not empty.
Can ONLY be used inside an IRQ, or when interrupts are disabled.
- Parameters
-
elem | an element from the queue. The element is valid only if the return value is true |
- Returns
- true if the queue was not empty
template<typename T , unsigned int len>
Get an element from the queue, only if the queue is not empty.
Can ONLY be used inside an IRQ, or when interrupts are disabled.
- Parameters
-
elem | an element from the queue. The element is valid only if the return value is true |
hppw | is not modified if no thread is woken or if the woken thread has a lower or equal priority than the currently running thread, else is set to true |
- Returns
- true if the queue was not empty
template<typename T , unsigned int len>
Put an element to the queue, only if th queue is not full.
Can ONLY be used inside an IRQ, or when interrupts are disabled.
- Parameters
-
elem | element to add. The element has been added only if the return value is true |
- Returns
- true if the queue was not full.
template<typename T , unsigned int len>
bool miosix::Queue< T, len >::IRQput |
( |
const T & |
elem, |
|
|
bool & |
hppw |
|
) |
| |
Put an element to the queue, only if th queue is not full.
Can ONLY be used inside an IRQ, or when interrupts are disabled.
- Parameters
-
elem | element to add. The element has been added only if the return value is true |
hppw | is not modified if no thread is woken or if the woken thread has a lower or equal priority than the currently running thread, else is set to true |
- Returns
- true if the queue was not full.
template<typename T , unsigned int len>
Put an element to the queue. If the queue is full, then sleep until a place becomes available.
- Parameters
-
elem | element to add to the queue |
Try to get an element from the circular buffer
- Parameters
-
elem | element to get will be stored here |
- Returns
- true if the queue was not empty
Try to put an element in the circular buffer
- Parameters
-
- Returns
- true if the queue was not full
template<typename T , unsigned int len>
If a queue is empty, waits until the queue is not empty.
template<typename T , unsigned int len>
If a queue is full, waits until the queue is not full