Classes | |
struct | Item |
Public Member Functions | |
bool | isEmpty () const |
T * | peek () |
const T * | peek () const |
void | pop () |
Queue (uavcan::IPoolAllocator &arg_allocator, std::size_t block_allocation_quota) | |
template<typename... Args> | |
bool | tryEmplace (Args... args) |
Private Attributes | |
uavcan::LimitedPoolAllocator | allocator_ |
uavcan::LinkedListRoot< Item > | list_ |
Generic queue based on the linked list class defined in libuavcan. This class does not use heap memory.
Definition at line 23 of file test_multithreading.cpp.
|
inline |
Definition at line 37 of file test_multithreading.cpp.
|
inline |
Definition at line 43 of file test_multithreading.cpp.
|
inline |
Accesses the first element. Nullptr will be returned if the queue is empty. Complexity is O(1).
Definition at line 89 of file test_multithreading.cpp.
|
inline |
Definition at line 90 of file test_multithreading.cpp.
|
inline |
Removes the first element. If the queue is empty, nothing will be done and assertion failure will be triggered. Complexity is O(1).
Definition at line 97 of file test_multithreading.cpp.
Creates one item in-place at the end of the list. Returns true if the item was appended successfully, false if there's not enough memory. Complexity is O(N) where N is queue length.
Definition at line 51 of file test_multithreading.cpp.
|
private |
Definition at line 33 of file test_multithreading.cpp.
|
private |
Definition at line 34 of file test_multithreading.cpp.