mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-28 01:27:55 +08:00
6abb43bde5
* fix thread * update version * add upstream PR URL * update version * fix macro * update version * delete comment * update version * fix stl * update version * Generate Imath.pc * update version * add dependency imath minizip-ng * updata version * Add type conversion * update version * update version * fix msvc test * update version * fix patch * update version * fix patch * update version --------- Co-authored-by: Jim wang (BEYONDSOFT CONSULTING INC) <v-wangjim@microsoft.com>
41 lines
1.1 KiB
Diff
41 lines
1.1 KiB
Diff
diff --git a/include/fastrtps/utils/TimedMutex.hpp b/include/fastrtps/utils/TimedMutex.hpp
|
|
index 8d5d968..7ba3e00 100644
|
|
--- a/include/fastrtps/utils/TimedMutex.hpp
|
|
+++ b/include/fastrtps/utils/TimedMutex.hpp
|
|
@@ -23,10 +23,14 @@
|
|
#include <iostream>
|
|
|
|
#if defined(_WIN32)
|
|
+#if defined(_MSC_FULL_VER) && _MSC_FULL_VER >= 193632528
|
|
+#include <mutex>
|
|
+#else
|
|
#include <thread>
|
|
extern int clock_gettime(
|
|
int,
|
|
struct timespec* tv);
|
|
+#endif // if defined(_MSC_FULL_VER) && _MSC_FULL_VER >= 193632528
|
|
#elif _GTHREAD_USE_MUTEX_TIMEDLOCK
|
|
#include <mutex>
|
|
#else
|
|
@@ -37,6 +41,11 @@ namespace eprosima {
|
|
namespace fastrtps {
|
|
|
|
#if defined(_WIN32)
|
|
+
|
|
+#if defined(_MSC_FULL_VER) && _MSC_FULL_VER >= 193632528
|
|
+using TimedMutex = std::timed_mutex;
|
|
+using RecursiveTimedMutex = std::recursive_timed_mutex;
|
|
+#else
|
|
class TimedMutex
|
|
{
|
|
public:
|
|
@@ -182,6 +191,8 @@ private:
|
|
|
|
_Mtx_t mutex_;
|
|
};
|
|
+#endif // if defined(_MSC_FULL_VER) && _MSC_FULL_VER >= 193632528
|
|
+
|
|
#elif _GTHREAD_USE_MUTEX_TIMEDLOCK || !defined(__unix__)
|
|
using TimedMutex = std::timed_mutex;
|
|
using RecursiveTimedMutex = std::recursive_timed_mutex;
|