Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding default ctor to interprocess_semaphore <1.10.x> [8229] #1169

Merged
merged 4 commits into from
Apr 22, 2020
Merged
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
1 change: 1 addition & 0 deletions cmake/modules/FindThirdpartyBoost.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ try_compile(IS_THIRDPARTY_BOOST_OK
${CMAKE_BINARY_DIR}
${PROJECT_SOURCE_DIR}/thirdparty/boost/test/ThirdpartyBoostCompile_test.cpp
CMAKE_FLAGS "-DINCLUDE_DIRECTORIES=${THIRDPARTY_BOOST_INCLUDE_DIR}"
CXX_STANDARD 11
LINK_LIBRARIES ${THIRDPARTY_BOOST_LINK_LIBS}
OUTPUT_VARIABLE OUT
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ class RobustInterprocessCondition

struct SemaphoreNode
{
bi::interprocess_semaphore sem;
bi::interprocess_semaphore sem {0};
uint32_t next;
uint32_t prev;
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,10 @@ class interprocess_semaphore
interprocess_semaphore &operator=(const interprocess_semaphore &);
#endif //#ifndef BOOST_INTERPROCESS_DOXYGEN_INVOKED
public:

//!Creates a interprocess_semaphore with the given initial count.
//!interprocess_exception if there is an error.*/
interprocess_semaphore(unsigned int initialCount = 0);
//!interprocess_exception if there is an error.
interprocess_semaphore(unsigned int initialCount);

//!Destroys the interprocess_semaphore.
//!Does not throw
Expand Down
2 changes: 2 additions & 0 deletions thirdparty/boost/test/ThirdpartyBoostCompile_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#include <boost/interprocess/managed_shared_memory.hpp>
#include <boost/interprocess/sync/interprocess_condition.hpp>
#include <boost/interprocess/sync/named_mutex.hpp>
#include <boost/interprocess/sync/interprocess_semaphore.hpp>
#include <boost/interprocess/offset_ptr.hpp>
#include <boost/thread/thread_time.hpp>

Expand All @@ -31,6 +32,7 @@ class ThirdpartyBoostCompileTest
ThirdpartyBoostCompileTest()
{
boost::interprocess::named_mutex::remove("foo");
boost::interprocess::interprocess_semaphore sem {0};

try
{
Expand Down