Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 0 additions & 25 deletions .github/ISSUE_TEMPLATE/bug_report.md

This file was deleted.

16 changes: 0 additions & 16 deletions .github/ISSUE_TEMPLATE/feature_request.md

This file was deleted.

3 changes: 2 additions & 1 deletion iceoryx_utils/include/iceoryx_utils/internal/cxx/vector.inl
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,8 @@ inline const T& vector<T, Capacity>::at(const uint64_t index) const
{
if (index + 1 > m_size)
{
fprintf(stderr, "out of bounds access, current size is %lu but given index is %lu\n", m_size, index);
std::cerr << "out of bounds access, current size is "
<< m_size << " but given index is " << index << std::endl;
std::terminate();
}
return reinterpret_cast<const T*>(m_data)[index];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,14 @@
#include <iostream>
#include <time.h>

#ifdef __APPLE__
struct itimerspec
{
struct timespec it_value;
struct timespec it_interval;
};
#endif

namespace iox
{
namespace units
Expand Down
4 changes: 4 additions & 0 deletions iceoryx_utils/include/iceoryx_utils/posix_wrapper/timer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@
#include <signal.h>
#include <time.h>

#if __APPLE__
#define timer_t time_t
#endif

namespace iox
{
namespace posix
Expand Down
14 changes: 12 additions & 2 deletions iceoryx_utils/source/posix_wrapper/semaphore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,13 @@ bool Semaphore::timedWait(const struct timespec* abs_timeout, const bool doConti
// interruption error
while (true)
{
#if __APPLE__
auto cCall = cxx::makeSmartC(
sem_trywait, cxx::ReturnMode::PRE_DEFINED_ERROR_CODE, {-1}, {ETIMEDOUT}, m_handlePtr, abs_timeout);
#else
auto cCall = cxx::makeSmartC(
sem_timedwait, cxx::ReturnMode::PRE_DEFINED_ERROR_CODE, {-1}, {ETIMEDOUT}, m_handlePtr, abs_timeout);
#endif
if (cCall.hasErrors())
{
return false;
Expand All @@ -115,8 +120,13 @@ bool Semaphore::timedWait(const struct timespec* abs_timeout, const bool doConti
}
else
{
auto cCall = cxx::makeSmartC(
sem_timedwait, cxx::ReturnMode::PRE_DEFINED_ERROR_CODE, {-1}, {ETIMEDOUT}, m_handlePtr, abs_timeout);
#if __APPLE__
auto cCall = cxx::makeSmartC(
sem_trywait, cxx::ReturnMode::PRE_DEFINED_ERROR_CODE, {-1}, {ETIMEDOUT}, m_handlePtr, abs_timeout);
#else
auto cCall = cxx::makeSmartC(
sem_timedwait, cxx::ReturnMode::PRE_DEFINED_ERROR_CODE, {-1}, {ETIMEDOUT}, m_handlePtr, abs_timeout);
#endif
if (cCall.hasErrors() || cCall.getErrNum() == ETIMEDOUT)
{
return false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ void* Allocator::allocate(const uint64_t f_size, const uint64_t f_alignment)
}

uintptr_t l_currentAddress = reinterpret_cast<uintptr_t>(m_startAddress) + m_currentPosition;
uintptr_t l_alignedPosition = cxx::align(l_currentAddress, f_alignment);
uintptr_t l_alignedPosition = cxx::align(l_currentAddress, static_cast<uintptr_t>(f_alignment));
l_alignedPosition -= reinterpret_cast<uintptr_t>(m_startAddress);

byte_t* l_returnValue = nullptr;
Expand Down