From 37a7bbc08cdb1bbd75ad9c3be0ce8370a2ed5ce9 Mon Sep 17 00:00:00 2001 From: Dmitry Kurtaev Date: Thu, 3 Sep 2020 16:49:48 +0300 Subject: [PATCH] [IE][VPU][Watchdog]: Reduce CPU usage for idle VPU (#2030) --- inference-engine/thirdparty/movidius/mvnc/src/watchdog/watchdog.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/inference-engine/thirdparty/movidius/mvnc/src/watchdog/watchdog.cpp b/inference-engine/thirdparty/movidius/mvnc/src/watchdog/watchdog.cpp index fb5afeb..a1821c8 100644 --- a/inference-engine/thirdparty/movidius/mvnc/src/watchdog/watchdog.cpp +++ b/inference-engine/thirdparty/movidius/mvnc/src/watchdog/watchdog.cpp @@ -110,9 +110,12 @@ WatchdogImpl::WatchdogImpl() { if (rc != 0) { throw std::runtime_error("failed to set condition variable clock. rc: " + std::to_string(rc)); } -#endif // !(defined(__APPLE__) || defined(_WIN32)) + rc = pthread_cond_init(&wakeUpPingThread, &attr); +#else rc = pthread_cond_init(&wakeUpPingThread, NULL); +#endif // !(defined(__APPLE__) || defined(_WIN32)) + if (rc != 0) { throw std::runtime_error("failed to initialize \"wakeUpPingThread\" condition variable. rc: " + std::to_string(rc)); } -- 2.7.4