Skip to content

Commit

Permalink
iox-#33 Rebase with current master
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Eltzschig <me@elchris.org>
  • Loading branch information
elfenpiff committed Jun 16, 2021
1 parent 808ed79 commit 36c3c22
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,6 @@ class SharedMemory : public DesignPattern::Creation<SharedMemory, SharedMemoryEr

/// @brief returns the file handle of the shared memory
int32_t getHandle() const noexcept;
bool hasOwnership() const noexcept;

static bool unlinkIfExist(const Name_t& name) noexcept;

/// @brief this class has the ownership of the shared memory when the shared
/// memory was created by this class. This is the case when this class
Expand Down
2 changes: 1 addition & 1 deletion iceoryx_hoofs/source/posix_wrapper/named_pipe.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ cxx::expected<bool, IpcChannelError> NamedPipe::isOutdated() noexcept
cxx::expected<bool, IpcChannelError> NamedPipe::unlinkIfExists(const IpcChannelName_t& name) noexcept
{
constexpr int ERROR_CODE = -1;
auto unlinkCall = posixCall(iox_shm_unlink)(convertName(name).c_str())
auto unlinkCall = posixCall(iox_shm_unlink)(convertName(NAMED_PIPE_PREFIX, name).c_str())
.failureReturnValue(ERROR_CODE)
.ignoreErrnos(ENOENT)
.evaluate();
Expand Down
4 changes: 0 additions & 4 deletions iceoryx_hoofs/test/moduletests/test_shared_memory_object.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,7 @@ TEST_F(SharedMemoryObject_Test, AllocateMemoryInSharedMemoryAndReadIt)
auto sut = iox::posix::SharedMemoryObject::create("/shmAllocate",
16,
iox::posix::AccessMode::READ_WRITE,
<<<<<<< HEAD
iox::posix::OpenMode::PURGE_AND_CREATE,
=======
iox::posix::Policy::PURGE_AND_CREATE,
>>>>>>> 4f0fc4f36 (iox-#33 removed implicit shm removal from posix wrapper and packed it into explicit policy)
iox::posix::SharedMemoryObject::NO_ADDRESS_HINT);
int* test = static_cast<int*>(sut->allocate(sizeof(int), 1));
ASSERT_THAT(test, Ne(nullptr));
Expand Down

0 comments on commit 36c3c22

Please sign in to comment.