This class to safely store a chunk in shared memory. To be able to do so, torn writes/reads need to prevented, since they create Frankenstein objects. Therefore, the class must not be larger than 64 bits and trivially copy-able in case an application dies while writing this and RouDi needs to clean up.
More...
#include <shm_safe_unmanaged_chunk.hpp>
This class to safely store a chunk in shared memory. To be able to do so, torn writes/reads need to prevented, since they create Frankenstein objects. Therefore, the class must not be larger than 64 bits and trivially copy-able in case an application dies while writing this and RouDi needs to clean up.
◆ getChunkHeader() [1/2]
const ChunkHeader* iox::mepoo::ShmSafeUnmanagedChunk::getChunkHeader |
( |
| ) |
const |
|
noexcept |
const access to the ChunkHeader of the underlying chunk
- Returns
- the const pointer to the ChunkHeader of the underlying chunk or nullptr if isLogicalNullptr would return true
◆ getChunkHeader() [2/2]
ChunkHeader* iox::mepoo::ShmSafeUnmanagedChunk::getChunkHeader |
( |
| ) |
|
|
noexcept |
Access to the ChunkHeader of the underlying chunk.
- Returns
- the pointer to the ChunkHeader of the underlying chunk or nullptr if isLogicalNullptr would return true
◆ isLogicalNullptr()
bool iox::mepoo::ShmSafeUnmanagedChunk::isLogicalNullptr |
( |
| ) |
const |
|
noexcept |
Checks if the underlying RelativePointerData to the chunk is logically a nullptr.
- Returns
- true if logically a nullptr otherwise false
◆ isNotLogicalNullptrAndHasNoOtherOwners()
bool iox::mepoo::ShmSafeUnmanagedChunk::isNotLogicalNullptrAndHasNoOtherOwners |
( |
| ) |
const |
|
noexcept |
Checks if the underlying RelativePointerData to the chunk is neither logically a nullptr nor that the chunk has other owner.
- Returns
- true if neither logically a nullptr nor other owner chunk owners present, otherwise false
The documentation for this class was generated from the following file: