17 #ifndef IOX_POSH_POPO_USED_CHUNK_LIST_HPP
18 #define IOX_POSH_POPO_USED_CHUNK_LIST_HPP
20 #include "iceoryx_posh/internal/mepoo/shared_chunk.hpp"
21 #include "iceoryx_posh/internal/mepoo/shm_safe_unmanaged_chunk.hpp"
22 #include "iceoryx_posh/mepoo/chunk_header.hpp"
41 template <u
int32_t Capacity>
44 static_assert(Capacity > 0,
"UsedChunkList Capacity must be larger than 0!");
72 static constexpr uint32_t INVALID_INDEX{Capacity};
75 static constexpr
DataElement_t DATA_ELEMENT_LOGICAL_NULLPTR{};
78 std::atomic_flag m_synchronizer = ATOMIC_FLAG_INIT;
79 uint32_t m_usedListHead{INVALID_INDEX};
80 uint32_t m_freeListHead{0u};
81 uint32_t m_listIndices[Capacity];
88 #include "used_chunk_list.inl"
WARNING: SharedChunk is not thread safe! Don't share SharedChunk objects between threads!...
Definition: shared_chunk.hpp:35
This class to safely store a chunk in shared memory. To be able to do so, torn writes/reads need to p...
Definition: shm_safe_unmanaged_chunk.hpp:31
This class is used to keep track of the chunks currently in use by the application....
Definition: used_chunk_list.hpp:43
bool remove(const mepoo::ChunkHeader *chunkHeader, mepoo::SharedChunk &chunk) noexcept
Removes a chunk from the list.
Definition: used_chunk_list.inl:67
bool insert(mepoo::SharedChunk chunk) noexcept
Inserts a SharedChunk into the list.
Definition: used_chunk_list.inl:39
void cleanup() noexcept
Cleans up all the remaining chunks from the list.
Definition: used_chunk_list.inl:106
UsedChunkList() noexcept
Constructs a default UsedChunkList.
Definition: used_chunk_list.inl:29
Definition: service_description.hpp:29