Skip to content

Commit

Permalink
iox-eclipse-iceoryx#751 Define SEM_VALUE_MAX in windows platform
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Eltzschig <me@elchris.org>
  • Loading branch information
elfenpiff committed May 23, 2022
1 parent fee00c9 commit d4fa175
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

#include "iceoryx_hoofs/cxx/expected.hpp"
#include "iceoryx_hoofs/internal/units/duration.hpp"
#include "iceoryx_hoofs/platform/semaphore.hpp"
#include "iceoryx_hoofs/posix_wrapper/semaphore.hpp"

namespace iox
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class UnnamedSemaphore final : public internal::SemaphoreInterface<UnnamedSemaph
private:
friend class UnnamedSemaphoreBuilder;
friend class iox::cxx::optional<UnnamedSemaphore>;
friend class SemaphoreInterface<UnnamedSemaphore>;
friend class internal::SemaphoreInterface<UnnamedSemaphore>;

UnnamedSemaphore() noexcept = default;
iox_sem_t* getHandle() noexcept;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@
#include <type_traits>

#define SEM_FAILED 0
// win32 API page talks about maximum allowed value without defining it or how to obtain.
// We use the SEM_VALUE_MAX from linux which is 2^31 - 1
#define SEM_VALUE_MAX 2147483647

struct iox_sem_t
{
Expand Down

0 comments on commit d4fa175

Please sign in to comment.