|
void | init (cxx::not_null< Index_t * > freeIndicesMemory, const uint32_t capacity) noexcept |
|
bool | pop (Index_t &index) noexcept |
|
bool | push (const Index_t index) noexcept |
|
◆ init()
void iox::concurrent::LoFFLi::init |
( |
cxx::not_null< Index_t * > |
freeIndicesMemory, |
|
|
const uint32_t |
capacity |
|
) |
| |
|
noexcept |
- Todo:
- : why init not in ctor
Initializes the lock-free free-list
- Parameters
-
[in] | freeIndicesMemory | pointer to a memory with the capacity calculated by requiredMemorySize() |
[in] | capacity | is the number of elements of the free-list; must be the same used at requiredMemorySize() |
◆ pop()
bool iox::concurrent::LoFFLi::pop |
( |
Index_t & |
index | ) |
|
|
noexcept |
Pop a value from the free-list
- Parameters
-
[out] | index | for an element to use |
- Returns
- true if index is valid, false otherwise
◆ push()
bool iox::concurrent::LoFFLi::push |
( |
const Index_t |
index | ) |
|
|
noexcept |
Push previously poped element
- Parameters
-
[in] | index | to previously poped element |
- Returns
- true if index is valid or not yet pushed, false otherwise
◆ requiredIndexMemorySize()
constexpr std::size_t iox::concurrent::LoFFLi::requiredIndexMemorySize |
( |
const uint32_t |
capacity | ) |
|
|
inlinestaticconstexprnoexcept |
Calculates the required memory size for a free-list
- Parameters
-
[in] | capacity | is the number of elements of the free-list |
- Returns
- the required memory size for a free-list with the requested capacity
The documentation for this class was generated from the following files:
- iceoryx_utils/internal/concurrent/loffli.hpp
- iceoryx_utils/internal/concurrent/loffli.inl